You have to have a lot for your viva.
You need some research, developed over several years or more.
You need a thesis, written to an appropriate standard.
You need one or more supervisors to help along the way.
You need a little time to get ready before the viva, doing the right things to help you be prepared.
You need to be a good candidate – someone who has done the work, improved through the effort and success – someone ready to engage with their examiners’ questions.
If these are the things you need to satisfy for the viva then you don’t need luck.