L.S.
Make sure you've latest Gigabyte x570 Release Bios (Non-Beta) installed for Gigabyte Ultra MB: F32 - AMD AGESA ComboV2 1.1.0.0 D and check that you've setup the Bios with correct (mostly default) values for your CPU and RAM (Do require settings).
Then first do test your RAM @3000 or @3200 speed using Passmark - MemTest86 see if it Test = Pass
Have you tested your CPU using Prime95: Options - Torture Test - Custom (Option) ?
Make sure with HWiNFO64 that the CPU temp remains in an acceptable range like 60-75 Celsius when running Prime95.
See if any of the Worker #Threads Stops then check the Prime95: Results.txt for FATAL ERROR:
FATAL ERROR: Rounding was 0.4997957145, expected less than 0.4
Hardware failure detected, consult stress.txt file.
Also try testing another Ryzen2 or Ryzen3 CPU in your Rig if available (Preferably with same TDP value) to see if this AMD CPU passes with same Bios settings and RAM.
If FATAL ERROR do occur with your CPU, you've most likely an defective CPU: First Request RMA at your HW Supplier they will then in turn issue an RMA request with AMD.
I've recently had issue with my AMD 3950x CPU on Gigabyte x570 Ultra F32 - were RAM was OK and my Rig worked fine with 3900x and 3700x and encountered Prime95 FATAL ERROR using my CPU, the 3950x Unit was returned to AMD on RMA.
Good look with your troubleshooting,
Kind Regards,
PatX