I am sure a lot of you have probably seen Hikaru's disrespect speedrun, and while he did do a lot of trash talking, he was free-styling the opening. Of course, while it is disrespectful (as he took it to a bit of an extreme), the reason it worked is because the opponents got confused too (and they were playing a top blitz player too). But when I say free-styling an opening, I do not mean playing something random, but I mean playing an opening without learning much theory before-hand (sometimes even just knowing what the position looks like after first 5 moves!).
Playing any opening without learning much theory is still ok, as long as you try to play logical moves. Even during Hikaru's messy openings, he still got some decent positional structures (such as a "flying V" pawn structure or a "wooden shield" which is the best version of a bad Bishop). In fact, if you are free-styling any opening by playing very logical moves, then you may even be playing a lot of theory (unless it is a super sharp opening). For instance, below I had actually forgotten what to play against the first 5 moves of the London system!
And to make matters even worse, this was during an OTB standard game (1h +10s each)! Fortunately, the London system is a very positional opening so even if I made some mistakes, I wouldn't be lost or very much worse. But I was free-styling in a 1h game!
By playing logical moves, however, I was actually playing a lot of theory and got a very pleasant position after 20 moves:
The full game (with my original annotations) is below:
While this was a very positional game, I even free-styled a gambit but stumbled on theory (as the opening I played happened to also be played by Garry Kasparov too!):
Again, I had forgotten the theory after the first 5 moves but through logical moves I had completely restricted my opponent. This was also a standard game with the same time control. In many openings, as long as you try to play with reasoning for each move, you are not going to put yourself in a lot of trouble.
Free-styling openings also will mean that you will understand what you are doing more (and it is actually how I learned the Reti which now I always play as white), but it is definitely not better than knowing the theory. One thing I will say is if you do know the theory, you must be able to understand why you are playing it. So rather than memorising 20 moves of theory, try to understand the plans in the opening and maybe even look at a few games from Grandmasters where this opening was played for a better understanding.
But in all cases, try to play as logically as you can!