Upvote:2
You don't need a visa if you remain in the international area of the airport and your layover is less than 48 hours. You do not need pre-arrival registration unless you intend to enter Hong Kong.
From Timatic:
TWOV (Transit Without Visa):
Visa required, except for Passengers with a confirmed onward (Air-to-Air or Air-to-Sea) ticket to a third country within 48 hours. They must stay in the international transit area and have documents required for the next destination.