The short answer
A second dog works when your current dog genuinely enjoys other dogs, your training is already solid, and you can cover double the vet care. It goes badly when people add a dog to fix loneliness or behaviour, because the new dog copies what is already there. The check below separates the two honestly, and it will tell you to wait if that is the real answer.

How does your current dog actually behave around other dogs?
The reason that predicts the outcome
Of everything in the check above, the single most useful answer is why you want a second dog. People who want two dogs and have the capacity for two dogs tend to do well. People adding a dog to solve something tend not to, because the problem was never the number of dogs.
Boredom is the usual culprit behind a dog that seems to need company, and it is much cheaper to test than to commit to. A midday walker, daycare a couple of days a week, or a standing walk with a dog yours already likes will tell you within a month whether company was really the missing piece. If it was, you have learned something useful. If the behaviour is unchanged, you have saved yourself fifteen years of the wrong decision.
Where the check flags aggression toward other dogs or resource guarding, that is worth taking seriously rather than managing alone. Both are common and both are genuinely treatable, but a second dog removes the space you need to work on them. The International Association of Animal Behavior Consultants lists qualified consultants by region, and one session before you adopt is worth more than a year of managing it afterwards.
Second dog FAQ
Tap a question to expand