@amusingmargaret i had this exact issue. we grew up with a small family dog and she wasnt treated the best, being around so many kids. but as i grew older i kind of claimed her as mine specifically and she really clung to me. there is so much i wish i did different but i cant blame myself because i was a child then.
in my dogs last years, i was almost an adult and then was one so i was caring a lot more carefully. what you can do now is make sure your elderly dog eats, makes sure they have clean water, make sure they can access their bed, get taken out a lot. look for signs of arthritis, brush their teeth, give them love and comfort. i used to have to help my elderly dog lay down at night because her arthritis was so bad she would get stuck in a loop of pacing. she was about 17.
just watch your dog a lot and make sure they are ok. thats what i did. watch for the small signs of maybe not eating, or not drinking, or having more accidents than usual. just remember that they cant speak what they want, so if something is wrong, youre the one to have to figure it out for them. having elderly dogs takes a lot of effort but its worth it in the end.