Depends on your Hat type and communication type. Normally it should work with Raspberry pi 5.

From internal testing, only POE hat cannot be use (Old version POE)