I would definitely book the spa in advance, especially if you're wanting to go during a day at sea. They fill up very quickly for the days at sea. If you wait until you are onboard, go to the spa immediately upon boarding to see if your desired day and time are still available.
As for shore excursions, again, if you know what you want, it's a good idea to book in advance. Check on the refund policy. Ships usually do reserve a number of places on the excursions for onboard booking, but again, it's first come, first served.