These usually arrive via bogus software-update pop-ups while web browsing that download fake installers, and from sketchy, free, cracked, and downloads not-from-the-canonical download site.
There are a very large number of sketchy removal tools and sketchy removal sites around, too.
And there are sketchy flash player tools.
There’s usually also little need for Flash Players r now, unless you’re specifically playing Flash games or such.
Malwarebytes can usually clear this.
Of what I’ve found among the first four or five pages of removal dreck, the following manual sequence looks the most reasonable and isn’t pushing an installer:
https://malwarhttps://www.malwarebytes.com/mac/
Even from that, I’d navigate to the MalwareBytes site myself and not via the link. (There are an intermediate stop in the URL redirect there.)
https://www.malwarebytes.com/mac/