Welcome to Apple Support Communities.
If I'm understanding correctly, you are having issues playing Youtube videos or while using the Safari app. I will be happy to assist.
First, I would suggest clearing the browsing history in Safari. Use the steps below from the article Clear your Safari browser history and set up content blockers on your iPhone, iPad, or iPod touch
Next, force quit Safari and restart your iPhone to see if that helps. Here are the steps below from the articles Force an app to close on your iPhone, iPad, or iPod touchDelete history, cache, and cookies
- To clear your history and cookies, tap Settings > Safari > Clear History and Website Data.
- To remove other stored information, tap Settings > Safari > Advanced > Website Data > Remove All Website Data.
- To visit sites without leaving a history, turn private browsing on or off.
Clearing your history, cookies, and browsing data from Safari won't change your AutoFill information.
and Restart your iPhone, iPad, or iPod touch
Force close an app
When you double-click the Home button, your recently used apps appear. The apps aren’t open, but they're in standby mode to help you navigate and multitask. You should force an app to close only when it’s unresponsive.
Here’s how to force an app to close.
View your open apps
Double-click the Home button to see your most recently used apps.
Find the app to close
Swipe right or left to find the app that you want to close.
Swipe up to close
Swipe up on the app's preview to close the app.
How to restart
- Press and hold the Sleep/Wake button until the red slider appears.
- Drag the slider to turn your device completely off.
- After the device turns off, press and hold the Sleep/Wake button again until you see the Apple logo.
Cheers.