How far in advance do you organise your accomodation?

Do you organise a month/week ahead? Do you wait till you’re at your destination then find a place?