Hello neueaxiom,
If videos play fine in other places, then it wouldn't be a graphics card issue. It could be an issue with Safari, do you have this same issue with all videos from any website or is it specific to just videos on the Youtube website? If the problem is just on the Youtube site, then that site may have some compatibility issues with Safari. If the same thing happens on all websites, then the issue is most likely coming from Safari.
You'll want to make sure you've covered the basics like restarting your device and making sure it's up to date.
Shut down or restart your Mac
Update macOS on Mac
Also, check the App Store to see if there's any updates available for Safari.
Use the App Store to update apps on Mac
You can try clearing the browser history in Safari as well to see if that helps.
Clear your browsing history in Safari on Mac
Cheers!