Is there any real difference between an AMD Ryzen CPU with an “X” at the end and one with “X3D”?

Right now I have a Ryzen 7 5800X; I upgraded from a 3600G. Huge difference. I changed it because I had a recent graphics card that was supposedly being bottlenecked by the old weak CPU, according to the technician. He had recommended a 5700X3D or a 5600X. He told me several times not to buy the 5800X because it has a problem with running very hot. I ended up buying it anyway and I don’t regret it. Really good CPU. It doesn’t even reach 60 degrees with the games I play.

I admit I acted on impulse. The store didn’t have the 5700X3D or the 5600X in stock.

So I’m left with this question: did I lose a lot of performance by not going with one of those two CPU models the technician recommended, or is the 5800X already good enough? What does the X3D do better than the X?