To connect AirPods to PS4 or PS5, you'll need to pick up a Bluetooth adaptor with audio capabilities, since Bluetooth doesn't come with the consoles.
You can set up a keyboard and mouse on your PS4 to browse the web and play games, but not every game will support it.