How to get php file based on URL in WordPress

WP determines template file by following Template Hierarchy. The process has quite a few steps between URL and resulting PHP file loaded, so generally one is not a reliable indication of the other.

Outside of looking through likely template files (good enough in a simple theme) you can try dumping this with code in template_include filter or using some debug plugin. For example Query Monitor shows main template file loaded.

Note that in more complicated theme (especially private ones) the actual PHP file might be deeply nested/included from the initial template file.