My 2018 Holden Colorado HSV Sportscat hard cover is not latching to the tailgate, preventing the boot from locking with a key or the central locking.
If neither the key nor the central locking will lock the hard-tonneau, it’s likely the latch is not engaging properly. Which in turn means you most likely have an alignment problem between the tonneau and the rest of the tray.
I’m not sure if you have the factory tonneau (probably) or an aftermarket one, but these are big, fibreglass panels that can sometimes shift a little on their hinges and fixing points, leading to the misalignment that won’t allow the latches to line up and engage.
The factory HSV tonneau for this car has a quick-release hinging system allowing it to be removed easily for carrying higher loads. Perhaps removing and refitting the tonneau via this feature will return everything to its correct alignment.