I am curious on how to implement a few functionality features:
1. How can I make the search bar only show certain products (i.e. only products that contain a certain phrase in the title or only products that contain a certain tag)?
2. How can I make the results that are more popular (clicked more often) show up before others when they both match the same searched criteria?
1. You can do exclusions or inclusions by taxonomy terms, that should cover the tags. Including by certain phrase is not possible.
2. If you are using WooCommerce, then you can try the following configuration: https://i.imgur.com/eBLOCud.png
WooCommerce stores the average rating in the _wc_average_rating custom field. If you prefer to order by sale count, then you can also use the total_sales custom field.
One quick question on #2. What would I use in that section if I want it to sort by the ones that are most clicked? Wc average rating doesn’t seem to be the same as that.