I'm thinking about upgrading from my current Ryzen 9 5900x to a 5950x. The rest of the system would remain the same. Would I need to install a clean OS or would that be unnecessary given that the architecture of the two CPUs is so similar?
You wouldn't need to do anything except swapping the CPU. They are the same CPU, both have 2 CCX-es with 8 cores, the 5900X just has 2 cores per CCX disabled.
CCX = core complex.
Might I ask why you're upgrading? Productivity tasks?