Vaccines work by prompting a targeted (partial) immune response. They give your body advanced designs for part of the virus so it can be proactive - the con is a vaccine can not provide all of the information.
Contracting a virus provides your body with the full genetic footprint of the virus. Assuming you survive, you should have better antibodies than what a vaccine can provide.