That's not true at all though, since PS5 runs a custom OS with custom API's which are unrelated to DirectX.
The PS5 OS is derived from Linux, not Windows. The PS5 custom API, if it's at all similar to the PS4 API, has both a higher level which is similar to OpenGL and a lower level that is similar to Vulkan. OpenGL and Vulkan are generally not used on PC, all developers except Id Software instead use DirectX 11 and 12 for high/low level API access.
There's a lot going on with console development which is invisible to PC gamers because in general you either have an actual PS5 devkit and are a registered developer for PS or you're not. Unlike with a PC where everyone is a developer and you can just download Unreal Engine and get started, developing for consoles requires jumping through hoops and signing forms and shit to get hardware you need sent to you.
A console is not a glorified PC in a special box. Even the Xbox has customizations to Windows and DirectX which aren't seen on normal PC's, though obviously an Xbox is closer to a PC than a PS console is.