You can find an adapter on amazon for 30-100$ and they have to be compatible mouse and keyboards but most are you should be fine but if you have to find compatible ones it’ll tell you which ones are and it’s still gonna be cheaper than upgrading a PC if you have to by new ones
C91 Keyboard and Mouse Adapter for PS4, Xbox One,Switch, PS3,PC https://www.amazon.com/dp/B07N3XC2T9/ref=cm_sw_r_cp_api_i_BkSqDb321GWAA this is the one I have 35$ works flawlessly
you have to buy an adapter so the ps4 recognizes the keyboard and mouse as a controller.,
https://www.amazon.com/dp/B07N3XC2T9?tag=wepcus-20
Here's an example
You can try this- https://www.amazon.com/dp/B07N3XC2T9/ref=cm_sw_r_cp_apa_i_qsAoFbVFRVA28