Comment by jitl
The comment above is elaborating on x86 micro-architecture, the differences between how the CPU handles x86 instructions specifically.
The overall system architecture is different between PC, which has discrete memory systems for the CPU and GPU, and a very long pathway between GPU memory and system/CPU memory, versus today's consoles which have unified memory for CPU+GPU, and optimized pathways for loading from persistent storage too.
Consolesuse their own graphics APIs, but you would have any vendor you contract with for graphics support your native graphics API and everything would be "fine". PS5 games use GNM/GNMX Playstation proprietary graphics APIs. Usually PC ports of console native games re-implement the rendering engine using the PC graphics APIs like DirectX or Vulkan. The re-implementation is probably less efficient and less tuned.
Great answer. Denuvo and other heavy anti-piracy tools are also sometimes used for releases on PCs which can seriously impact performance.