Maybe try to walk off-stage right from the beginning.
I'd say, book a bed for your first night in St. Jean, and then maybe until Pamplona. By then it should be easier to find beds without booking.
Most pilgrims will walk St. Jean - Napoleon route to Roncesvalles - Zubiri or Larassoana - Pamplona. So, those places often fill up quickly.
If you prefer not to make reservations or want to get away from the crowds, you could try walking different stages instead, for example:
St. Jean - Valcarlos (lower route, short first day, albergue municipal can be booked) - Espinal (private albergues, can be booked, if you don't find anything try the Camping Urrobi slightly off the way, they also have pilgrims beds!)- Zabaldika (parroquial donativo, first come first served, therefore bed safe if you arrive early enough) - Cizur Menor (non bookable). Or If you want to spend more time in Pamplona, you could stop at albergue Casa paderborn (can't be booked, and when you arrive from Zabaldika, you should be there early enough to get a bed).
Not a popular opinion, but I'd also advise to bring a sleeping mat additional to the sleeping bag during high season.
A light foam mat is enough. Not that much more weight, but if a town is truly full, sometimes emergency shelters are opened, and having a mat can be very helpful then.
If all fails, don't panic.
Walk to the next bar. Sit down and have a coffee. Make some phone calls to find out where the next place with an available bed is. Ask the person behind the bar counter to please call you a taxi there. Problem solved.
Wish you a Buen Camino!!!