Found 1 interesting game and many months ago and found something very interesting, he made a beam that can move randomly : https://gyazo.com/9eafa30aa605f6301e8713bcb7054cfa
At the time I was a little bad at programming, now I want to know how I can make a similar one.
I do not want a script, just instructions or what he did to create this, I believe he used Bezier curves

2 comments
Don't go from little experience to coding stuff like this. It's better to work slowly and reach to the top, so you actually understand what this is when you're scripting it.
I have to disagree with Groovyll here in general -- working on something you don't fully understand is the first step to understanding it. In any case, it seems like OP isn't very new anymore. I would guess he generates four control points for a 5th(?)-degree bezier curve. One at each end, and two in the middle offset by some random amount. Interpolate from t=0 to t=1 and voila.