Update: use Search & Navigate Add-on
In the example screenshot, you can search for "History" and it will highlight the header only, it will not search for "History" in the normal text.
This simple add-on helps you quickly find and navigate to the necessary part of your document.
Once you open the sidebar, you can switch between the list of headings, bookmarks, images, tables, and search results. Enter a keyword in the search field at the top to see all its entries in your document. A click on any entry in the list will take you to the paragraph you need to see.
Workaround: tag the headers
Tag your headers. Start any header with an often used word with #, or at least add the hashtag as soon as you once had the problem to find the header. In the example, this would make "MySQL" "#MySQL". Then you can quickly find just the header by searching for "#MySQL"