Pages with URLs directly below the domain don’t need to be close to the home page for Google. Internal links are used to determine the proximity of pages to one another.
When a page is close to important pages such as the home page, it can improve its chances of indexing as well as its ranking potential in Google search results.
However, the distance between a page and the homepage does not depend on the URL structure and the directories contained there. For example, a page with the URL example.com/directory1/directory2/page might be closer to the home page than a page with the URL example.com/page.
The reason for this is that it depends on the internal links and how many jumps it takes to get to a certain page from the homepage, for example. John Müller also said that it is only about the links from the homepage to the respective page, not links that point from the page to the homepage. Even with a flat URL structure without folders, the proximity of the pages to the homepage is determined by internal links.
As already reported, when it comes to the website structure, the most important thing is the internal linking and not the URL structure.