I always book ship excursions for reasons of safety and convenience.
My husband and I are very frequent cruisers on Royal, and I recommend booking tours as soon as as possible once they’re offered, especially during one of their ‘Cruise Favorites Specials’ sales, which pop up online for a few days every couple of weeks. The best sale time if the year is the Black Friday period.
I often book my tours many months in advance. If a better tour or price comes up I cancel and book the better option. Bring retired, I have the time to watch prices diligently. The tour prices will continually go up, especially the more popular ones. They dynamically change prices based on demand; I’ve seen them double on many occasions. Also, these days, many tours sell out quickly, and the options are very few and very expensive once onboard.
Bottom line: if you are able to lay out the money to book early, do so, and then keep watch.