How can I prevent the new indexing bug from creating useless pages on Google?

I’m not sure if this is helpful, so pls let me know if I’ve completely missed the mark here.

I responded to this thread months ago when I first noticed google had indexed some “non pages” on our website. I simply added a “no index” to any pages which had “vendors?q=” in the url and then added the offending url to my GSC removals.

I subsequently had another random “vendors?q=” type url index, I followed the same procedure.

I’ve had no issues.

What am I missing?