Sitecore supports three different search engines: Solr, Azure Search, and Lucene. You must consider several factors, such as the purpose of the specific environment, your scaling requirements, and the hosting environment, when you choose a search engine.
Solr is the default search engine for content search and xConnect search for on-premise installations
Use Lucene only for a development or single server evaluation environment that runs Sitecore Experience Manager. You cannot use Lucene in a scaled environment. You can only use Lucene for content search. xConnect does not support Lucene. We do not recommend or support Lucene in a production environment.
Refer to the Sitecor document for more details.
https://doc.sitecore.com/xp/en/developers/92/platform-administration-and-architecture/using-solr,-lucene,-or-azure-search.html
It's recommended to use Solr as Support for the Lucene search engine is no longer included in Sitecore 9.3, and later
Hope this helps.