This question already has an answer here:
Is it possible to eradicate the human race in one week? And if yes, by which way?
Of course, the human race should do everything to survive. What could be more powerful than our will to survive?
1. Nuclear bomb
Imagine that tomorrow, all the nuclear warheads of the planet explode on a maximum of countries. There would necessarily be survivors, people who would be confined in bunkers. Such a catastrophe could be the cause of our extinction but over a long period.
2. Natural disasters
Suppose all the volcanoes in the world come into action. In addition, tsunamis that ravage the coast and earthquakes that destroy cities. In this case, there would still be some survivors. People who have taken refuge and are sheltered. Maybe the Earth would still be habitable in a few years (after the fall of the ashes of volcanoes). It can be assumed that humanity can recover from such a catastrophe.
So what could eradicate humanity with very short delay?
I forgot to give some informations: We can set aside any extrasrestrial intervention or all things unknown to mankind right now. We are talking only about human activity or natural disasters that could actually happen. Is there really an event that could cause our extinction in such a fast time?