My advice: don't. By your own admission, a solution in search of a problem.
Adobe Flash Player is a notorious security problem. As a result, there is a never-ending stream of security updates issued by Adobe. And because users are conditioned to install updates, hackers have entered this space to produce pop-ups with links to websites that will install malware or adware on your computer. These pop-ups are almost always not legitimate.
Flash, thankfully, is rapidly fading away. You don't need it. If you don't have Flash browser extension installed, most web videos these days will run using another standard, HTML5. For those rare times when you need to run Flash, simply launch the Chrome browser and navigate to the appropriate website. Chrome somehow embeds Flash capability in the browser, automatically kept updated and secure by Google so you don't need to install anything.
I uninstalled Flash from all of my family's Macs years ago and have not missed it at all.
If you already have adware or malware on your computer that is producing these pop-ups, try installing and running Malwarebytes to remove the malware. Link:
https://www.malwarebytes.com/mac/