No, you don't need to reinstall if you upgrade the CPU. Not sure but I think you will never have to on GNU/Linux operation systems, even if you change to an different Mainboard/Chipset. One nice advantage compared to Windows. Of course it's necessary to flash the right BIOS/UEFI before mounting the new CPU.
5900x is a decent CPU and a nice upgrade to the 1800x. I bought a used 5900x for only 165€ this year from a guy who bought it for over 670€ in late 2020.
Zen3 and PB2 gives you some nice options to configure the CPU for your personal need also. If you want it super cool and quiet run at 65W eco mode. If you don't need a high single core performance and your use case is multithreading,
the performance boost can be disabled to reach some more relaxed temperatures without dropping to much performance.
And there is also PPT TDC and EDC und Curve Optimizer for undervolting.
So a lot of thinks to lern here 🙂
But keep in mind that such an AM4 system is maxed out pretty much und AM5 would be a better choice futurewise. The AMD Ryzen 5 7500F is a nice budget CPU for AM5. I think there are also cheaper Motherboards on the way. (B850- & B840 Chipset)