Yes, some tricks are needed here. Perhaps this article
https://qubstudio.com/blog/best-ux-prac ... interface/ on the site of my favorite company Qubstudio will help you. In this article, you will be able to look at examples and learn the best practices of UX agencies for search box design. And here you need to know the key points when search engines are really needed and when they are justified to create. A godsend for me was that here are some cool ways to improve your search bar to make your customers as comfortable as possible.