Follow Samsung’s procedure, wipe and restore your phone, then
don’t download modified APKs or other malware infested apps.
This type of problem is on the user, so self-examination of your
behaviour and habits would be prudent.
To tackle ads appearing frequently on your Samsung A31:
Uninstall Suspicious Apps: Remove recently installed or unfamiliar apps.
Run a Malware Scan: Use antivirus apps to check for malware.
Clear App Cache/Data: For problematic apps, clear cache/data in Settings.
Enable Google Play Protect: Ensure it’s on to identify harmful apps.
Ad Blocker/Extensions: Consider installing a trusted ad blocker or review browser extensions.
Reset Advertising ID: In Settings > Google > Ads, reset the Advertising ID.
Manage Notifications: Disable notifications for apps displaying excessive ads.
Factory Reset (if needed): As a last resort, perform a factory reset after backing up data.
For persistent issues, seek assistance from Samsung’s support or service center.