There could be any reason behind it and it's difficult to say. We usually go with the basic steps like sitemap, site structure, index tag, "Page available for index" on search console when manually checked, etc. If everything looks normal, then we can check for other factors like penalties and crawl budget issues.I revived a project after two years and rebuilt the site, but basically only the home URL is indexed—none of the others are getting indexed. Could this be related to the algorithm?