Is there a way to create spline automatically?

image

Add Spline Point at Index should be the right node for you. Spawn your “Spline Actor” and put your Spline creation to Begin Play.