It is likely you may be fired at some point in the course of your career. This, of course, can come as a total shock but it is imperative to come to terms with such an experience so that you can recover quickly and be able to represent yourself well in upcoming job interviews.
Spend some time processing what happened and practice verbalizing the lessons learned in a non-emotional way. Keep a positive attitude that you are preparing to go on to bigger and better things. The reality is that even to employers these days being fired isn’t necessarily a mark against you depending on how you recover.
Many successful people have been fired at some point in their career before becoming a superstar.