No, you don't need to reinstall, because Ubuntu compiles all packages for what is known as "generic amd64". This is a collection of instruction sets present in every single amd64 CPU. Any programs that use instructions beyond this base set(also known as instruction set extensions) include fall-backs.
Now, let's assume:
- you were using packages that make use of instruction set extensions, such as AVX2 and don't provide fall-backs,
- you're moving to a CPU which doesn't support this particular instruction set.
This is highly unlikely to happen when only switching CPUs. You'd have to be downgrading the CPU to find one on the same motherboard that supports less instruction sets.
Even then, you wouldn't need to reinstall your OS, although it might be the easier option. You could instead recompile your packages to generic amd64. After switching everything would work fine, albeit slower. To accelerate it, you could recompile yet again, this time using extensions supported by the new CPU.