https://support.mozilla.org/en-US/kb/add-or-remove-search-en...
Be aware that in Firefox, the "Search Bar" is a distinct widget from the "Address Bar" (omnibar/"awesomebar"). If it's missing or you can't find it, here's the docs for that UX flow:
https://support.mozilla.org/en-US/kb/customize-firefox-contr...
If you do this, you can (of course) revert your change in about:preferences#search; the new search engine will persist there as an alternate choice.
(Tested and confirmed this works with e.g. Yandex in release version 98.0.1. This patch only removed, essentially, Firefox' promoted or sponsored search engines -- not core functionality. (It also erased and reset user preferences, but that's a separate problem)).