This article explains how to use a PS5 DualSense controller on a PS4.
How do you use a PS5 controller on a PS4?
The PS5 controller won’t work with the PS4 alone, so you’ll need to purchase a Bluetooth adapter. This usually comes in the form of a USB device that plugs into the PS4. The adapter then pairs with the PS5 controller via Bluetooth, while the PS4 recognizes the adapter as a generic Bluetooth controller.
Many different adapters offer this functionality; however, make sure you're looking for PS4 compatibility as well as DualSense support. An adapter may not be compatible with PS5, which is fine, but the most important thing is to make sure an adapter is compatible with PS4 and the DualSense controller.
Setting it up with an adapter can vary, but generally the process is largely the same. For the purposes of this article, we'll be talking about using Mayflash's Magic-S Pro adapter as it meets the criteria outlined above.