Choosing the right server version is very very very important otherwise you are just gonna create a huge amount of problems for yourself.
Every version of the ubuntu server has default versions of Apache, PHP, and MYSQL and a lot more other software come with it. Some of them are installed and some of them are ready to be installed.
Before choosing a version ask these questions;
What PHP version do you want?
What MYSQL version do you want?
Let’s say you want PHP 8.1 you can install the Ubuntu 22.04 LTS version.
Here are the official release notes and PHP version information https://discourse.ubuntu.com/t/jammy-jellyfish-release-notes/24668
Let’s say you want PHP 7.4 you can install the Ubuntu 20.04 LTS version.
Here are all Ubuntu Server versions, release notes, and other stuff you can find https://wiki.ubuntu.com/Releases
By the way, I think I don’t have to say never install the middle versions only install LTS versions.
Long Term Support is more important than you think.