The A320 chipset motherboards are iffy about using 5000 series cpus. AMD Official policy is that All AM4 cpus will work, but that stops there. AMD is not responsible for what the Aftermarket Partners do. So whether a 5000 series cpu will actually work on a particular A320 mobo is entirely dependent upon the bios provided by the Vendor. A 5600 may work, or might not work, that is something to be verified by contacting Gigabyte about that particular motherboard.
The problem itself stems from the bios chips used. The A series was bottom of the line basic, even some early B series also suffered, because the bios chip used was too small in size to accept the massive amounts of info and update instructions to accommodate Zen, Zen+, Zen2 and Zen3 use. Newer bios chips doubled the size of the chip, so are big enough, but early A+B series were stuck trying to put 10lbs of stuff in a 5lb bag.
Don't buy the 5000 series cpu until you can verify it will work, or you have a 50/50 chance with even the latest bios, of having a bunk cpu.