Do you mean upgrade or reinstall?
I have done release upgrades in multiple occasions all the way from 16.04 -> 18.04 -> 20.04 -> 22.04 -> 24.04. Usually they work fine, but of course back up your stuff first. When doing it with release-upgrade all your stuff is of course kept just like before.
Basically just:
sudo apt update
sudo apt dist-upgrade
sudo reboot
sudo do-release-upgrade
This will upgrade to 22.04. After upgrade just repeat process to upgrade to 24.04
I had laptop running Ubuntu 16.04, which was running for 2273 days without reboots or anything. It was located in safe place so not even security updates were installed during that time. And it was still completely fine after all these days (little bit over 6 years). It was finally shut down when there was electricity break, and its battery failed, and I decided that it was time to retire it.
There of course were tons of updates available then, but no one forces you to install them. and in Debian system instead of Ubuntu, there will be lot less, their release policy is much stricter.