you can try going to controller support within steam and check if the controller is working this is on the DS4 website try this troubling shooting Using a PS4 controller in Steam
Thanks to official Steam support, there’s almost no setup involved in getting your PS4 controller working in Steam. Just be sure to pair or plug in your controller before opening Steam or any Steam games, otherwise your controller may not be recognized.
Open Steam
Go to Settings in top left dropdown
Open Controller tab
Click General Controller Settings
Register device to your account
Change preferences
Calibrate joysticks
Tick PlayStation Configuration Support
Remap from Settings Controller tab/in game
If you run into any connection issues, closing and reopening Steam should do the trick. Otherwise, try using a USB 2.0 port instead of a USB 3.0 port. DualShock 4s are weird like that.
Once connected, navigate to Steam’s settings menu—under the top left dropdown—to get everything running smoothly. Under the Controller tab, open General Controller Settings; you should see your controller listed under Detected Controllers. From here you can register it to your account, so it will remember the settings on any PC you log into.