Yes, according to your motherboard's CPU Support processors it does support having the Ryzen 9 3900X installed.:ASRock > Fatal1ty X370 Gaming K4
But first you must update the Motherboard's CHIPSET & BIOS to the latest version before installing. Also you need to see if the RAM Memory you have installed is listed on your Motherboard's QVL List for RAM MEMORY. At the moment there is not QVL List for Matisse Processors for your motherboard.
I would recommend opening a ASRock Support ticket to see if the RAM Memory you have currently installed will be compatible with the new Ryzen 9 3900X or wait until ASRock Support comes out with a Matisse RAM MEMORY QVL List.
BIOS: ASRock > Fatal1ty X370 Gaming K4
You MUST UPDATE the Motherboard's CHIPSET BEFORE updating your BIOS to version 5.40 or later. Click on the Blue Link on the BIOS page for version 5.40 to first install the recommended Chipset.