I had sex with a girl and used a condom, then I pulled out, masturbated and ejaculated inside the condom. Checked it with water and was no leak?

Smart to use condom. If all you noted was true, chances are pretty good that you have avoided an unintended pregnancy. Continue to practice safe sex, and do not (EVER) reuse a condom for any reason even if there is no discernable hole/leak.
Here are some ... I would like to command your precaution in practicing safe sex with condom. But still remember there has been no known contraceptives offering 100% success; so, be responsible for what you do. The higher alert and caution you take, the less the worry will follow; nothing is free but always comes with a price. Best wish...