You usually have to buy it withing a limited amount of time from booking, precisely for this reason. Insurance companies don't want to sell insurance when the known risk has changed. Or, avoid insurances and pay a little more for refundable flights. Most hotels let you cancel without penalty within a day or two of your scheduled arrival; few other expenses would normally be prepaid or nonrefundable unless you're on a cruise or a group tour.