What device & One UI version is running on your device?
What kind of websites are you getting redirected to?
Does anyone else have access to your phone?
You should change your passwords & Enable 2-Step verification for your device.
You can try Booting into Safe Mode & see if the behaviour continues.
If it doesn't, then it's likely that the problem is coming from a 3rd party app.
You should know that not ALL apps from the Play Store are 100% safe.
You could always backup your device with Smart Switch & Factory Reset. But when you backup, only backup the apps that you KNOW are safe & that you recognize.
The websites im getting redirected to arent inappropriate ones theyre more like articles? Like this one: https://xilxi.com/4019.html
I also have 2 step verification aswell as I use a password generator for my passwords so nothing is really the samr acroas anything, and even then I still need to co firn it on my phone by pop up or sms
Someone told me to erase all data on all my browsers so I did and so far I havent been redirected, but I'll see if that fixed the problem later on