I recently got a pixel 2 xl and would like to use it with my m50x's and prefer not to buy a dongle I will lose. I have an extra USB C and extra 3.5mm cable i just need to know how I need to go about connecting them. Diagrams and full on walkthroughs would definitely help, thank you.
It won't be worth making your own. The chances of you making a product that actually sounds good and stays in working condition is unlikely. The only way you might make it work is with some really good tools.
According to a few quick searches the Audio Technica M50x's have a female 3.5mm connector on one headphone cup. In order to have one cable without adapters you would need a 3.5mm male to USB C male. The problem is that the cable that comes with the headphones has a special spiral groove to keep the cable end from falling out the headphone cup. This means that any cable you plug into it might just fall out.
Amazon 3.5mm Male to USB C Male (3 ft length) Something like this could work if you want to take the risk of the cable end falling out of the headphone cup.
Your other option is to turn your headphones into bluetooth headphones using a portable bluetooth receiver. I bought THIS ONE on Amazon and it has been amazing. It has turned pretty much any pair of headphones or speakers I own into wireless ones. There are other brands that sell these small, compact bluetooth receivers as well. Just search for 3.5mm Bluetooth Receiver.