Why is my PHPmyAdmin site running, but my PHP files wont?

You are following a tutorial from 2016. I recommend that you use a php image that contains a web server, like php:apache-buster and read the docs of the php image, especially the section ‘Image Variants’.