You generally can purchase insurance anytime after your initial booking until the day you travel. HOWEVER, if you want to include any 'pre-existing conditions' in your coverage, most of the major travel insurance companies will require that you purchase and pay for your insurance within some specified number of days following your booking (e.g., 10 days). When my elderly mother is traveling, or when I am traveling, we always make sure to cover pre-existing conditions, since it gets increasingly hard to avoid those as a reason for needing to cancel a trip. (And they wouldn't allow me to travel home to be with my mother if she had a medical crisis based on her pre-existing condition while I was traveling unless I had this coverage). Both my mother and/or my late father have had to use such insurance to cancel trips for medical reasons numerous times over the years.
Note that some of the 'cheaper' travel insurance don't have any option to include pre-existing conditions -- so check that carefully if you want this coverage.
Re: cruise company insurance vs. others, I agree that stand-alone companies are often cheaper, but we actually used this for the first time on a cruise last year. We were glad we did, since we had to cancel the trip at the last minute because of a non-medical issue. The beauty of that insurance was that it was very comparable in price to other major companies like TravelGuard and CSA, it included airfare coverage, and it actually also included 'cancel for any reason' insurance that usually comes at a high premium for other companies (something we really needed in this instance). It was also incredibly easy to use, and just a phone call to cancel the trip was enough to get reimbursed, no paperwork, no forms, nothing. (Unlike the cumbersome insurance documentation I had to pull together over several months for a $235 medical services claim for my mother when she was on a trip abroad last year).
In my case, I always make sure I am very insured for all eventualities even when I travel on my own because of my elderly mother, and the possibility that I'll have to cancel or interrupt a trip at any time. YMMV.