Hi there, Alixlee!
Thanks for posting, it's a pleasure having you apart of the community. Congratulations on your new iPhone 12 Pro Max! This must be an exciting time for you. Based on what's going on you've downloaded some new game apps, but they don't have any sound when you use them. Allow us to assist, so you can enjoy using your new iPhone!
You mentioned this works fine with TikTock and YouTube, which is great. However, these games should have sound, as well. When you originally set up your iPhone, did you restore a backup or set it up as new? That will help us a bit to see why these other apps work, while the new ones are not.
Are you using headphones when this happens? If so, disable Bluetooth in Settings > Bluetooth and test it out using the built-in speaker on your iPhone. Should this only occur with headphones, try to disable 'Reduce Loud Sounds' in Settings > Sounds & Haptics > Headphone Safety, then test it out. Learn more about this feature here: Headphone notifications on your iPhone, iPod touch, or Apple Watch
Should it persist, try to reinstall these apps, in case there was an issue with downloading them in the first place. You can follow step 4 here to test it out: If an app unexpectedly quits, stops responding, or won’t open
Working through the above, we hope these solve the issue. In case it doesn't, let us know more about the results of those steps, along with the information on how the iPhone was set up. Wishing you the best, take care!