My SO had a very hard time with this, too, and waited too long. I promised my dog I wouldn’t make the same mistake. My personal criteria are as follows.
1. List your dog’s 5 favorite things to do.
(For me: cuddling on the couch, playing fetch, going for walks, chasing squirrels, and swimming at the lake).
2. When your dog can’t do 3 of their favorite things, it’s time to evaluate their quality of life. If she can’t chase as fast but she’s giving it her all, then she’s okay. But if she doesn’t bother chasing anymore I will know something is wrong.
3. If they seem as though they are in pain at any point which is not treatable, or stop eating or being responsive, it’s time.
Talk to your vet. A lot of them are trained to give options, not brutal honesty. Ask what the options are, quality of life for each option, and ask them very honestly what they would do. They probably won’t give you a straight answer. Ask again. If your best friend is suffering, it’s kinder to be with them when they go and not drag it out even if you aren’t ready.
I am so sorry for your situation.
Edit: I just got through the rest of the replies. I’m so sorry for your loss but am so happy that you spent quality time with your pup before he had to go. It’s always so hard to lose a dog because they’re just so good compared to us.