Yes, according to ASRock CPU SUPPORT LIST: https://www.asrock.com/mb/AMD/B550%20Phantom%20Gaming%204/index.asp#CPU
You need BIOS Version P1.80 or newer to recognize and boot up with the 5700G processor.
NOTE: It is possible your motherboard came with an older BIOS version then P1.80.
This ASRock Support site gives you instructions on how to check which BIOS Version you have installed on your motherboard by a sticker: https://www.asrock.com/support/index.asp?cat=FindBIOS
EDIT: If you motherboard came with an older BIOS version less then P1.80 then you need to find another supported processor to update the BIOS on your motherboard or take it to a computer shop to have them update the BIOS version or see if AMD will send you a AMD BOOT KIT to update your BIOS from here: https://www.amd.com/en/support/kb/faq/pa-105