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"