GPU uses the same RAM chips and some portion is reserved for it. I think, you can control how much through the BIOS, there’s the option there having values like Normal/Gaming, with Gaming allocating more RAM to the GPU.
I don’t have the Desktop, but that’s also what happens with AMD APU on Steam Deck and iGPU on Laptop 16.
You would also lose some RAM to memory reserved for other peripherals, but I’m not sure how much it is these days.