Are you sure? Women can have kids after 39. Maybe not easily, but should be possible until like 45. Definitely with medical assistance.
Is she on board though? If not, you don't need to stay with her. Your goals in life are worth more, and you don't want to resent her for the rest of your life "you're the reason I don't have kids and I regret it always"
Still worth it to get checked out. My wife is also late-thirties. We consulted with an IVF doctor and he said that she her reproductive system is still similar to that of a 35yo woman (meaning that although there is increased risk, it's similar to that of a 35yo than a woman close to 40). Luck of the draw.
Of course if you're a 40 years old women, you can try, but I wouldn't tell a woman that "she can have babies after 40", since it's a very risky gamble, aside from the complications of birthing and pregnancy, and illnesses such as Down's syndrome, which are much more prevalent when the mother is older.
Is she on board though? If not, you don't need to stay with her. Your goals in life are worth more, and you don't want to resent her for the rest of your life "you're the reason I don't have kids and I regret it always"