A male betta does not get pregnant. What often looks like a pregnancy is actually the male diligently guarding a nest of eggs, which is easy to mistake for the female carrying young.
Betta breeding is a bit involved. Breeders typically set up a special mating container or net that holds one male and one female. The general sequence goes like this: the male builds a bubble nest, the female lays her eggs, and the male fertilizes them and then scoops them into the nest to guard until they hatch. Once the fry are free-swimming, the adults are usually removed, since both parents may eat the tiny babies if left in the net.
If you want to confirm the details or troubleshoot your own setup, dedicated aquarium and betta-keeping communities are a great resource, as experienced hobbyists can correct any missteps and guide you through the process.