Thats going to depend on how often you want to lose that pilgrim shadow. In the major cities: Pamplona, Burgos, Leon, Ponferada you will find barber shops that will scrape you back to civilised. Otherwise carry a few lightweight disposables and borrow a dab of olive oil from the Albergue kitchen.
There is an old thread plugging a barber in Santiago for that final trim.
https://www.caminodesantiago.me/community/threads/shave-and-a-haircut-in-santiago.39213/#post-391347
Me, I just let it grow. Never did me any harm