What’s the best way to find spells meeting certain criteria in D&D 5e? For example, I'm currently working on a warlock and I want to see a list of all cantrips that scale with the spell slot used. Another example would be looking up all spells that do a particular type of damage (fire, cold, etc.).
DnDBeyond is what you want
The best official tool for looking up spells online currently is DnDBeyond.1 DnDBeyond is Wizard of the Coast's officially-licenced online source for rules. It has an extensive spell search function. It will not allow you to filter specifically for scaling cantrips, but you can filter by spell level (including cantrip), damage type, class and by many other parameters.
For example, here is the spell list filtered for Warlock spells that do cold damage.
Note that by default, you will only be able to access details for spells that are in the Basic Rules or from sources you own. For example, if you tried to access the details for the spell illusory dragon you would be prompted to purchase all or part of Xanathar's Guide to Everything in order to access it.
Still, you should see the names of all the spells in your search regardless of what online sources you own. So even if you can't access the details online, you can still look it up in the physical books you own.
1 - For comparison I have also used both Roll20 and Fantasy Grounds before. Neither of whom can beat DnDBeyond in amount of content, ease of use, and/or number of filters. Roll20 has issues in general that make it a subpar resource compared to DnDBeyond as well. Fantasy Grounds must be installed as an application in order to be used. To my knowledge, these are the only two other officially licensed sources for online-searchable spells. This is why I say that DnDBeyond is the best source for these things currently.