Whenever you search for something on Facebook, your search terms get stored in your Activity Log.
I will show you how to check it and (if deemed necessary) erase it:
The Activity Log is only viewable by you, but if you want to erase any of your old searches for whatever reason – or even if you just want to view them (to find something you forgot) – it’s really easy to find!
Click the little triangle icon in the upper right-hand corner of Facebook, and head to Activity Log. from there, click the “More” button in the left sidebar to reveal the “Search” option. Click on it to view your search history. If you want to erase it, there’s a button in the upper right-hand corner to do just that.
I couldn’t find a setting that turns this history off entirely, unfortunately, but again – the posts are only visible by you, so it shouldn’t be a huge problem.