Nearly all apps, especially those like games, connect to website back-ends today in order to display the advertisements that are being used to pay for the free versions of these to remain available.
Unfortunately, it's also relatively common for a few of these advertising networks to abuse their access to consumer devices by reselling their access to other less reputable ad networks that provide this to criminal advertising organizations to distribute their malvertising content instead.
Based on your description of the redirection by the gaming app, I suspect that's what's truly happening, most likely also based on your own past browsing habits which are regularly resold throughout this same complex system of advertisers and networks.
The most common way that people try to deal with this issue today is via browser-based Ad Blocker extensions, though these basically do the same things that the combination of a few Windows Privacy settings related to advertising and the Microsoft Edge browser - Tracking Protection found at the links below do as well.
Learn about tracking prevention in Microsoft Edge - Microsoft Support
View your data on the privacy dashboard - Microsoft Support
General privacy settings in Windows - Microsoft Support
Disabling the Windows Advertising ID, Targeted Advertising and setting the Edge browser Tracking Protection at least at the default 'Balanced', or possibly the 'Strict' level has a similar effect of appearing to websites as an Ad Blocker, though the browser extensions which do this typically have a finer, or at least simpler, level of control over which specific websites are allowed to do what regarding advertising.
Rob