This isn’t a one size fits all question, unfortunately.
You decide this when safety is an issue, either their’s or someone else’s.
That can be at anytime, and how you do it, is also varied.
I know that this doesn’t help, but my Dad had to stop at 82, and my Mom could still drive safely at 88.
In our case Mom just took over the driving responsibilities, and she basically just stopped driving herself.
Having elderly parents is tough sometimes. I watched my hero deteriorate in front of my eyes