It's important to note that this type of PHP installation is usually managed by package managers, that handle this process through automated scripts. Additionally, applying patches to tailor the PHP ...
Unfortunately hosting services vary quite a lot in the way they work. Some will even install Moodle for you. Most will offer a web-based control panel to control your site, create databases and set up ...
I used your Vanilla Drupal 9 recipe in the docs, and although I am on a non-supported version of docker, that doesn't appear to be the cause of issue here as an unsupported php version is being used ...