Typically, there are 16 lanes used per GPU and 4 per M.2 SSD.
With older CPUs, you had to either reduce the lanes assigned to the GPU to connect an SSD to the CPU, or go through the chipset.
With newer CPUs (newest intel or AMD Zen), the CPU provides 20 Lanes (16+4) for general use and in the case of AMD, 4 additional lanes for the chipset.
If you want more lanes connected directly to the CPU, you have to go to HEDT or Server Chips with up to 128 lanes available.
See this article for a typical block diagram of a AM4 system.
https://www.guru3d.com/news-story/amd-ryzen-3000-new-block-d...
Here you see, there are 1x16 / 2x8 lanes for GPU, and 4x PCIe/SATA combo ports from the CPU which can be used for connectivity.
More lanes can be provided by the PCH (Chipset).
Another example is in this artice by anandtech, which even lists the slots explicitly in the block diagram. https://www.anandtech.com/show/14657/the-asus-pro-ws-x570ace...