I've just crawled my website in Screaming Frog and I have around 6K Internal URLs and 4K external URLs. Then I looked in GSC and saw that Google indexed 50K pages.
How is that possible?
Pages serving content depending on parameters aren't necessarily a problem for Google, unless they have essentially duplicate content to each other.
There are several ways of handling this:
Noindex: Add a no-index tag to the results pages which serve this duplicated content or disallow spidering in the robots.txt file. This will instruct Google to simply not include these pages in their index. You can follow this up with a manual instruction through Google Search Console to remove these pages from the index (although they will disappear after a short while, anyway).
rel="canonical": Specify to Google that these pages are essentially copies of another page using the meta rel="canonical" tag, so that Google understands that these pages should be seen as simply another URL to access the same data as elsewhere.
URL Parameters Tool: Google Search Console includes a parameters tool which gives you the ability to explain your parameters and ensure that Googlebot understands which parameters lead to duplicate content. This can be more helpful if you have non-standard session ID values stored in GET variables within the URL. https://support.google.com/webmasters/answer/6080548?hl=en