understanding theme hierarchy

Your understanding is incorrect. That’s not how WordPress works, and that documentation is not saying what you describe.

The hierarchy rules tell you what template is used when you view content types created in WordPress, such as Pages and Posts.

If you create a page called “Test” in Pages > Add New, then when you visit that page’s URL it will use the hierarchy to determine which file to use as its template. For a page called “Test” these are the files it will try:

  • page-test.php, if it exists.
  • page-123.php, if it exists (in this example the page ID is 123).
  • page.php, if it exists.
  • singular.php, if it exists.
  • index.php

You do not create content in the theme files.

WordPress is a content management system. It is not just pointing URLs to files in your theme. You use its interface (or REST API) to create content which is saved in the database. When you visit a URL, WordPress uses your permalink settings (Settings > Permalinks) to determine the type of content you’re viewing, queries the correct posts from the database, and then displays the result using the PHP templates in your theme by following the template hierarchy.