You should follow these steps;
1) Buy the best quality pair of headphones you can get. Most of your money should go here.
2) Set your minimal audio materials quality to lossless CD format, which is 44.1kHz /16bits. I strongly recommend a Tidal HIFI sub, cheapest way to access best quality music atm. You get access for MQA catalogue, which contains music up to 96 kHz /24bits.
3) If the volume is low or distorted or you get hiss in the background and you are sure that it is computer related, buy a DAC/amp combo.
I have a pair of M50x as well. You do not need an amp for M50x to feed from the computer. If you think the sound coming from headphone jack is not clear (background hiss or hum etc), then you should look for an external USB DAC/amp combo. If you are on a budget, check out Mayflower O2/ODAC rev B combo unit. If you look for an amp to improve or change the tonality of M50x in some way, please don't. Just look for another pair of headphones. Because what amps and DACs do is to improve the quality of the signal coming to your headphones from your source.