Search queries might return empty results immediately after restarting Sitecore XP. The issue goes away approximately a minute after completing the Sitecore XP initialization.
To resolve the issue, change the order of processors in the <initialize> pipeline by moving the InitializeSolrProvider processor up before the InitializeScheduler processor. For example, open the Sitecore.ContentSearch.Solr.DefaultIndexConfiguration.config file and replace
<processor type="Sitecore.ContentSearch.SolrProvider.Pipelines.Loader.InitializeSolrProvider, Sitecore.ContentSearch.SolrProvider">with
<processor type="Sitecore.ContentSearch.SolrProvider.Pipelines.Loader.InitializeSolrProvider, Sitecore.ContentSearch.SolrProvider" patch:before="*[@type='Sitecore.Pipelines.Loader.InitializeScheduler, Sitecore.Kernel']"/>