I think it depends on what type of videos you do. For example, if you make comedy/skit videos, having a script could really help. And for informational videos, scripts are rather monumental and an absolute necessity as it would prevent you from babbling unnecessarily as well as presenting the information you want to present in the most concise and effective way possible, and that can't come out of someone who is being put on the spot (unless you're already a really good and experienced public speaker, I guess).
But for gaming videos, I would personally recommend against having a script. A lot of the appeal of the gaming videos usually comes from the spontaneity of your reactions, and it's hard to sound genuine if you already knew what was going to happen. And if your audience catches wind of it, they might not be too happy to find out that all your reactions have been pretty much faked.
Though, pre-planning an event or two could work. You wouldn't have to write an entire script, just come up with an interesting element or two. Specifically for chaos to happen at a specific time in the video in order to spice it up and grab the viewer's full attention back. It'd be executed through 'accidentally' messing up, 'accidentally' looking over a crucial detail (which leads to severe consequences), etc. Personally, I'm not sure how I feel about it, because a lot of the times, for me, YouTubers who have done it just comes off as dumb and I would just get frustrated over their incompetence (there have been quite a few, some bigger Youtubers included).
And of course, there's also a trend of YouTuber gamers deliberately skipping the tutorial to a game, fully knowing that they would most likely fail ("Who needs tutorials? I'm sure I'll do fine! This game can't be that hard!"), and that failed runs are usually one of the most entertaining ones to watch. Also not a fan of this 'technique' for the same reasons as the previous one. I get that it's meant to be entertaining, but a lot of the times I just find it excruciating to watch.
So, that said, make of that what you will. As someone mentioned, there's pros and cons to it. Do what you think is the best for you and what you think helps you create the best content possible.