Zend certified PHP/Magento developer

Upgrading Old Installation and Server. Magento 2.3.4 to 2.4.6

I have an old Ubuntu server that I need to update along with everything else as its been neglected for many years.

Some Server Details are:
Ubuntu 16.04.4 LTS
PHP is 7.2.24
Magento version is 2.3.4

I’m looking to update the server to the 22.04.3 LTS along with upgrading PHP to 8.2.12.
I know that I’m going to have to start using Elasticsearch or Opensearch.

My question is:
What is the correct upgrade path?
Do I need to update Magento to the latest stable version first, but then the PHP version won’t be supported. If I install Elasticsearch version 6, when I upgrade Magento it won’t be supported.
All I seem to be finding is that I should just create a new server with a fresh install but that’s a lot of work that I don’t have time for at the moment.

Any help would be appreciated