How to create hogwarts legacy-like projectile movement

I want to make similar projectile movement to basic cast like shown in this video, I tried doing loop that make it goes up and down with sin/cos waves, however ifIi do it the projectile is getting offset from the position that was clicked… any suggestions how should I do it? any tips? I want to control the control the final destination of the projectile too like lerp it to there but when I do it the “wave effect” is not seen