You didn't specify whether you ae talking about while using the browser or generally always.
If web browsing almost all of them have ad blockers you can install. Heck Even the Samsung browser has a pretty nice one.
If the ads are popping up All the time you most lkely have installed an App that is misbehaving or contains malware. If you can recall an apps you might have installed about the time it started, try unstalling it (them).
You might try going to your mobile data and look at what apps are using data. From there expand each app you may have a question about and set Restrict background data to ALWAYS.
There are several "lively" debates about this on the Samsung Forums. Seems a lot of folks started getting hit with ads after the last update. Aside from blaming Samsung personally, there has not been one specific cure. Samsung has started doing this on their smart tvs so I wouldn't rule it out completely. That said, one thing that has seemed to help a lot is turning OFF personalized ads in your google account. settings > account > google > security&privacy.
Other than turning off notifications on all apps except the few you really want them for, turning data saver on, restricting background data on all apps except those you specificly want to run in the background, there is no quick solution, at least as of yet. You will probably have to take a fair amount of time and uninstall or disable every app on your phone, see if it stops, then reinstall them one at a time and see if or with what app the problem returns with. This is especially true with all the "preinstalled" apps that come with the device. Hope something here helps. If any total solution comes to light I will post it here.