The thread pulls out of the needle
A take-up lever that is down when you start gives the first stitch nothing to pull, and the tail whips out. Raise the needle with the handwheel, power off if you are unsure, until the manual's start position is there, then hold both tails. Rethread if the top thread was not in the take-up. A needle with a sharp burr at the eye cuts the thread so it looks as if it pulled out. Fit a new needle. If you have done those and the thread still leaves on plain cotton, stop. Do not wax the top thread to make it stay. This varies by machine. The manual for the model in front of you is the authority.
Leave a longer tail than you think. A stub of thread has nothing for the hook to catch.
The bobbin tail matters too. Hold both.