There is an argument that the loss of dynamic range and other factors in the compression required in mp3 or CD recordings make the latter inferior to vinyl. This was a prolonged debate forty years ago
CDs have better quality than vinyl in every way. If you want the sound of a vinyl, apply the modulation and record the result on a CD.
In practise, popular music recorded on CDs often had poor mastering (see "loudness wars") where the dynamic range was reduced to make the recording sound louder.
Dynamic range compression is not "required", it's a choice of the mastering engineer. You can produce MP3 or CD recordings with higher dynamic range than vinyl if you want to.
Dynamic range compression is often used on most mainstream music because said music is rarely listened in perfect conditions in one's living room. They need to sound decent enough in the street, in a car, on a metro/train during rush hours, in the kitchen while cooking, on the beach, from allkinf of devices from crappy smartphone headphones, phones and computers integrated speakers or cheap bluetooth speakers.
Ideally one would own 2 different recording of the songs they like. One for good listening environments and high quality equipment, one for more hostile environments. Or have devices that apply dynamic range compression on the fly when needed.