Can you get pregnant if you rub through your underwear and don’t ejaculate during ovulation?

Rubbing through your underwear without ejaculating during ovulation will not result in pregnancy.
Although a mature egg is released during ovulation, rubbing it through your underwear will not result in pregnancy. The basic conditions for pregnancy are the presence of a mature egg and sperm, and an open duct for transporting the sperm and egg.
If the sperm cannot enter the vagina through the underwear, there is no chance for it to combine with the egg to form a fertilized egg, and therefore pregnancy will not occur. Pregnancy is only possible if there is real sex during ovulation, sperm is injected into the vagina, and no contraception is used.
If there is no desire to have children in the near future, contraception can be used by using a condom throughout sex.