You must put your projects into htdocs folder, either create a subfolder and put your files there or put the files into htdocs directly, Simply apply the file name in the browser:
http://localhost/subfolder/myfile.php or
http://localhost/myfile.phpIf you omit the filename and apply only a folder like
http://localhost/subfolder or
http://localhost, the Apache server delivers the index.php from that folder. Therefore, if you simply enter
http://localhost, Apache delivers the index.php from htdocs, which then redirects to the Xampp dashboard. You may also simply replace that index.php by your own index.php