Pulling out before ejaculation can help prevent pregnancy, but it’s risky because guys can’t always tell exactly when they’re going to ejaculate. Also, some guys have a small amount of sperm in their pre cum.
If you and your girlfriend think you might continue to experiment with vaginal sex, she should ask a health care provider about going on an effective form of birth control to avoid unintended pregnancy.
Using birth control AND condoms together is the best way to prevent pregnancy AND STIs. If you want to keep using the pull-out method to avoid pregnancy, you should also use condoms in case there’s sperm in your pre cum or you don’t pull out in time.