Ubuntu pulled a blinder many years ago with their LTS model. You get a new one every two years with five years support for each one and a guarantee of moving from one to the next. That gives you quite a lot of time to deal with issues, without requiring you to live in the stoneage.
For example: Apache Guacamole is a webby remote access gateway thingie. It currently requires tomcat9 because TC9->10 is a major breaking change. Ubuntu 22.04 has TC9 and Ubuntu 24.04 has a later version (probably 10). However Ubuntu 22.04 is supported until 2027. So we stick at Ubuntu 22.04 and get security updates etc.
Guacamole is currently at 1.5.5, and the next version will be 1.6.0. The new version will have lots of functionality additions. The devs will then worry about Tomcat editions and the like. Meanwhile Ubuntu will still be supported.
In my opinion the two year release/five year supported model is an absolute belter.