Could you make a pcie expantion card?

would it work to make a pcie expantion card so you could use a desktop graphics card
like a smaller egpu

Yes and no. You can’t get PCIe directly, as the cards connect over USB4. But USB 4 multiplexes 4 PCIe lanes. eGPUs work already via USB4 or Thunderbolt. So it could work theoretically.

In practice the cards don’t have space to house anything worthwhile on the GPU front.