Welcome to the community, @Raiders2455!
I'd strongly recommend you consider getting an internal 2.5" HDD that is compatible with your PS4 console, instead of using the HDD inside your WD My Passport external. Unfortunately, taking the drive out of the original enclosure will void its warranty and you won't be able to RMA or replace the drive in case any issues occur.
I'd suggest you use the external WD My Passport accordingly and copy your files from your computer or console onto it. This HDD is supposed to be used as a backup drive for your files. Taking it out of the casing might not work due to the fact that it incorporates a hardware-based encryption that won't allow you to read previously stored data without that enclosure.
Better get a bare internal HDD that is compatible with your PS4, rather than voiding the warranty on your backup drive. You can check some of
WD's internal HDD solutions or our
WD internal SSD storage.
Always make sure you have at least two copies of your files stored in different storage devices to prevent any potential data loss.
Good luck! Hope this helps.
SuperSoph_WD