Basically trading is a skill-based activity, meaning your profit always depends on how much knowledge and skills you have, but that does not mean luck is not involved in it.
On the other hand, feeling too confident when a beginner manages to make a profit without being based on any strategy or method, I think it is something that is natural, because over time they will know that it is a false belief, experience will tell them through the adaptation phase, but of course I would also suggest that it is better for a beginner to know that feeling too confident just because you have managed to make a profit is not good, and you can get that knowledge by learning more from traders who share their experiences on several channels.
Sure, some will indeed experience luck in trading. But they should not be confident that they will always have such luck. Trading requires experience and skills so you can have a good grasp of this tedious activity. I don't think there will always be the beginner's luck.
For me, even though I know that luck can help me make a profit, now I will never dare to trade without being based on any analysis or strategy, because in any case losing money will always be an annoying situation even though I know that there might be luck that helps me make a profit, and I'm sure some people who are quite experienced will also think like that.