Explore structuring the search expressions with joins/intersections etc as the great thread that @nicolas_dap kindly shared
If you anticipate large lists in the tens/hundreds of thousands that your app will handle then explore alternative UI design to lower the size of these lists. Explore alternative database structure. Explore alternative database setups and searching for large scaling. Backendless, Algolia.
You can always contact Bubble to explore dedicated cluster plans. They accomodate apps that grow quickly and work with you to support your growth.
Managing growth is another one of those problems … albeit good but tough nonetheless … that apps face