How do I remove an automatic bug/virus premium messaging/MMS box from popping up and stopping sending texts? I have a Google Pixel phone and I received a shady message saying something like: "You have been subscribed to such-and-such and are paying such-and-such amount. To unsubscribe text whatever to whatever".  Unaware of the the malice I foolishly replied to the text. A box popped up saying "this may cause charges on your mobile account remember my choice" Instantly I knew I made a mistake to I tried to rectify it with my my phone provider. As I tried to text them, the same box popped up. I closed it I tried to contact an alternative number provided by my phone company and the same thing happened. I used a different SMS app from the play store. Same thing. I factory reset my phone, then hard reset it. Same thing. How do I get rid of it? What do I do?
It’s typically not a “virus”, per se. A virus is a program that can infect another program or active content data file (such as a Microsoft Word Document) with itself, as a result of running or opening the infected program or document.

It’s most likely malware or adware, that you’ve unwittingly installed it on your phone, or if not, you may have had your DNS settings in your router hijacked, or you may simply be visiting sites that have JavaScript-based redirectors that trigger after conditions are met.

The process you will need to use depends on how it operates. For a lot of malware or adware, it typically comes in when you install an already infected application from the Internet.

There are a lot of people who intentionally propagate these infections through either third party “App Stores”, or through “sideloading” of applications. Typically, they operate by offering the application for a discounted amount, or for free, when the app typically costs more, or would normally come from a different location. If you use Windows PC, freeware from the Internet may bring such adware or malware.

This is most common in Asia.

The largest contributors to this problem are:

Companies who are pirating applications, and have decided to “make a little money on the side”
Government agencies
Pirated/redistributed development environments (for example, the most common way Apple iPhone/iPad/iPod Touch applications get infected is a pre-infected copy of Apple’s “XCode”, which downloads very slowly when obtained from official sources in many areas of the world).
Region locking/region restriction; this is mostly a copyright and distribution rights issue, which is very annoying if the App you want has not been licensed for distribution in a given region (if it’s this: I suggest you learn to live without the App for now, and contact the manufacturer of the App, asking for it to be made available where you are).
The first thing to determine is exactly what’s doing the redirection.

For example, if it’s your router, it’s not even your phone’s fault, and it can usually be fixed by updating your DNS settings in the router, or having the ISP doit for you.

If it’s a JavaScript redirect built into a template page that you’ve downloaded and applied to all of your browser pages, it’s a multistep process; her’s an example for the malware known as ad-type.google.com:

Disable JavaScript in all your browsers
Install anti-malware software, such as “Malwarebytes for Android”
Run the anti-malware software to remove the store JavaScript copy of the malware
Reenable JavaScript in all your browsers
If it’s from an App installed from something other than the Google App Store, then you will need to deinstall the application. You are on your own, determining which one(s) brought the infection onto your phone.

In rare cases, there have been infections due to infected software hosted on the Google App Store (not even Google can catch everything!), and if this is the case, updating your Apps relatively frequently, and deinstalling Apps that are no longer listed on the store can also help.

In additon, Resetting you Ad identifier from
Google settings -> Ads
(Google settings is an app in your app drawer)

This stops the malicious adscript being targetted to your device based on a previously dropped cookie from a malicious app/site.