An important feature (for non-gamer) is that both the 5700G and 8700G provide more than 8 lanes of PCIe (which was a limitation on the previous AMD APUs).
AMD 5700G: Gen 3, 16 Lanes (CPU only)
AMD 8700G: Gen 4, 20 Lanes (CPU only)
Ref:
https://www.techpowerup.com/cpu-specs/ryzen-7-5700g.c2472
Phoenix, 8 Cores, 16 Threads, 4.2 GHz, 65 W
www.techpowerup.com
Because both include an iGPU, these PCIe lanes can be used for anything other than a GPU, if for example, your goal is server usage.
I have an AMD 5700G with an AM4 motherboard offering 16x, 8x8x, 8x4x4x PCIe bifurcation. An inexpensive bifurcation PCIe card for 8x8x (with the UEFI configured accordingly) allows the integration of (for instance) a high-speed NIC and a hardware-base RAID card. This is appropriate for a "cheap" file server or Proxmox server over 10 GbE, 25 GbE or even 45 GbE with IPoIB using a 2nd hand Mellanox ConnectX3 card from eBay.
If I were to upgrade to an AMD 8700G (I'm not as of this writing), the first thing I would do is to look for an AM5 motherboard offering bifurcation of the PCIe lanes or offering two 16x slots that can be used as 8x 8x.