I have seen quite a few folks post here that mention that their phone will randomly show an ad, or make a strange sound. 99% of the time, the cause is an app that was installed on the phone.
While there is the issue of these apps that are made to intentionally Spam you with ads and do other nefarious things, there are plenty of other legit apps that are not malicious at it core, but can still push the occasional annoying ad outside of the ap itself.
This started happening when my Grandmother needed a QR code scanner app for some reason, and had managed to install a few from the play store, until she found one that she could figure out how to work. Then just left them all on the phone and came to me later, complaining as to why every other time she went to use the phone, a full screen ad was there making noise and she could not make it go away without clicking on it, then pressing the home button to “get back to the screen with all the buttons to call people” as she puts it. (she barely understands how to use a smartphone)