Yes, definitely. This is not one of the places where you can just show up. You need a ticket in advance. The best place to buy is their official site: https://www.caminitodelrey.info/en/tickets/buy