You’re not a failure if you don’t answer every question you asked during your PhD.
You’re not a failure if your thesis is smaller than your friend’s thesis.
You’re not a failure if you’ve not submitted papers for publication.
You’re not a failure if you find typos in your thesis after submission.
You’re not a failure if you’re asked to complete major corrections.
You’re not a failure if your confidence wobbles before the viva.
You might feel nervous, or scared, or worried about any of these.
But not every question has an answer. Theses vary in size. Plenty of candidates opt not to publish during their PhD. Most candidates have typos. Some candidates are asked to complete major corrections to make their thesis better. And feeling a lack of confidence is not uncommon before important events.
The way you feel doesn’t mean you automatically fail.