Honestly it sounds like a problem with stability or strength of your WiFi.
Personally I have found that YouTube and other apps are not as finicky about a stable network connection within a browser, typically because of buffing.
Several years ago, when my parents house

had DSL before the upgrade to Fios, occasionally the WiFi would become unstable and I noticed that my YouTube app and other apps would either not work or would be unstable. Typically, however, YouTube and my Gmail or Hotmail would work using a browser.
Personally my suggestion would be to first try rebooting your WiFi Router or Network Switch. Also I would try using YouTube and other apps on your phone while you are connected to a strong public WiFi network connection to confirm that the problem is with your home WiFi.
If rebooting you home WiFi router does not resolve the issue, then I would contact your home internet provider to request a replacement WiFi router.