I have seen this issue if you are using a bad version of the archetype to build your project. What version of AEM are you using? What version of the archetype are you using. We did notice RepoInit was creating the issue with indexing. We upgraded to 6.5.7 and we got rid of the RepoInit files in the archetype and deleted the index directory (makes the system reindex), and the problem went away. Check the error logs as requested, and you might see an issue with the repo initializing. We started down the route because we read https://blogs.perficient.com/2020/06/17/one-tool-to-configure-them-all-sling-repoinit/ .
This is a symptom which normally just shows up when your repository is corrupted and is not able to start. In the logfile you should see more error messages before which give more information about the type of the problem.
If this is a local development environment, it normally doesn't make much sense in trying to fix that, it's much faster if you just start over with a new repository.
ERROR* [Apache Sling Repository Startup Thread] com.adobe.granite.repository.impl.SlingRepositoryManager Exception in a SlingRepositoryInitializer, SlingRepository service registration aborted org.apache.sling.repoinit.parser.RepoInitParsingException: Encountered " "set" "set "" at line 4, column 9. Was expecting: <EOF>