WordPress uses the query string to decide which template or set of templates should be used to display the page first according to the user's request. This mechanism is called template hierarchy in WordPress. The query string is a piece of information that is contained in the link to each part of your website.
Put simply, WordPress searches down through the template hierarchy until it finds a matching template file. To determine which template file to use, WordPress:
By default, WordPress sets the site’s home page for the display of our latest blog posts. If
home.php does not exist, WordPress will call
front-page.phpexists, it will override the
Read the details about template hierarchy in WordPress from this link.