Yes, CDs usually sound much better than records. But that's because records are highly affected by dust, scratches, clicks, pops, etc.
Something to consider: most CDs are made (mastered) from analog sources.
The point is that analog audio (which includes vinyl records) can sound better than digital CDs. But in reality vinyl usually gets scracted and dusty so will sound worse in that respect. And no one is suggesting people throw away CDs and go back to vinyl!