To all the excellent advice above, I'll add my limited (SJPP to Burgos), anecdotal, experience last October when my husband and I managed to attend mass 12 out of 14 days.. Except for those two nights (Valcarlos and Larrasoana) we were staying in the "
Brierley" stage stops, i.e., places were there were concentrations of pilgrims. Had we gone to mass in St. Jean before heading off (too excited to stick around....) or stayed in Zubiri (pushed on the extra couple of kilometers), it would have been 14 for 14.
Mass was in the evening and posted somewhere in the church. Usually around 7 or 7:30 p.m. My fast-moving husband arrived in town first and was able to scout things out for us. By the time I arrived, most of the churches were locked for siesta, and I'm not sure how easy it would have been to learn when and where mass was at that point. But ask at your albergue/hostal/casa when you arrive, or wherever you stop for a drink or to eat, or even check with the priest or someone in the town the day before.
Also, since I have a habit of stopping in any open church to pray and check out St. James, on a couple of occasions I dropped in somewhere just before morning mass or morning prayer was beginning. Not only was I welcome with my backpack, poles and hiking boots, the Buen Caminos and Signs of Peace I received seemed especially heartfelt.
Each of these masses was very special in its own unique way, and always with pilgrims called to the front for a special blessing. I found it very moving to think that in these towns all along the camino, the local residents were praying for our safe journey day after day.
Check the resources above, be on the alert as you walk, and Buen Camino!!