The Earl Marshal has the job of planning royal funerals and coronations and other state occasions. It is part of his duties to regularly update the arrangement for these functions.
Even though coronations take place months, usually at least a year, after the previous monarch's death, some planning is done in advance.
As for this musical piece - considering that Handel has been played at every coronation since George II it certainly isn't beyond the realms of possibility that this piece, written for the Coronation of George II, will be used at the coronation of Charles - whenever that takes place.
The Queen had Handel at her coronation, along with lots of other music.