I’ve always had cats instead of dogs, but the best advice I was ever given was to keep the critters indoors. It’s been said that our animals live longer if they are kept indoors or confined to our own property because they are less likely to contract communicable diseases or get into fights with other animals, or be killed by some idiot with a grudge.
My brother is a veterinarian now retired. He always said outdoor cats live short violent lives. Neutering helps but they’d still catch diseases and can be killed by other animals