As @renehoj says, the 4GB is a limit on the memory available to dom0. The
remaining memory is allocated to the qubes you run. Qubes actively
allocates memory between qubes.
In most cases 4GB should be fine in dom0, because it isn’t doing much
work.
If you do want to change the maximum allocated to dom0, you can do so temporarily, by interrupting the boot and editing the boot parameters:
the default parameter is dom0_mem=max:4096M
To make the change permanent, edit /etc/default/grub, change the
option in the GRUB_CMDLINE_XEN_DEFAULT line, and run: grub2-mkconfig -o /boot/grub2/grub.cfg for Legacy BIOS grub2-mkconfig -o /boot/efi/EFI/qubes/grubx64.cfg for UEFI
If you want to change the memory allocated to a qube, you can do this
in Qubes Settings, on the “Advanced” tab.
You can also set it using qvm-prefs