The sound quality of vinyl, even today’s vinyl won’t be as good as the high-rez digital recording because vinyl has medium format limitations.
It often doesn’t work that way in practice. It is very common for record companies to put a recording’s highest dynamic range version on LP. Check the dynamic range database - you might be surprised. It’s all part of the Loudness wars.
CDs don’t suffer from the same dynamic compression issues that vinyl does because the format can hold more information.
But that it might hold more information doesn’t ensure that the particular pressing will take advantage of that. Often it doesn’t.
And of course, HF on LP far exceeds what can be put on CD.