so, you should avoid punishing for toilet behavior in the house. it sounds like she really just doesn’t know the rules yet.
these two links are pretty similar and i’d read both. they should help.
https://lookaside.fbsbx.com/file/How_to_Housetrain_Any_Dog%20(1).pdf?token=AWzFzr8QX0C6GNFaOKVxlOKyjHpjo4l1GKKLvup9PqoNRBewfhYcPaW8epVfl7TD-hzvF2V2XyFxKavjepjUKq75rqsQH7ckQTKV-VOq-pItBQ
remember, be consistent. good luck. housebreaking is the biggest pain in the butt regardless of the age of the dog.
If he is not on Heartworm preventative then your dog could have heartworms. Why is he not on preventative? It sounds like it could be a heart problem and he should go to the vet. A vet is the only one who can diagnose Heartworms or another heart problem.