There are providers that offer something called ‘post departure’ or ‘already travelling’ insurance. Which means you’re able to get cover even if you’re already away.
Not all travel insurance providers offer post departure insurance, so it’s more advisable to book your insurance as soon as you’ve booked your flights.