You committed a forbidden act by masturbating to extract semen, and you must repent and seek forgiveness. And you, as a Muslim man, should not have made this donation, and you should not be embarrassed by their loss of money.
As for the woman’s vaccination, if the insemination took place and she became pregnant, then the boy is your son or daughter, and he is attached to you and the mother, not to the woman’s husband, and he inherits you and you inherit him.