I have the following hardware:
Mainboard : ASRock X370 Gaming K4
Serialnummer : 73 M0XB193260
System BIOS : AMI (OEM) P3.30 09/11/2017
Gesamtspeicher : 31.47GB DDR4
Prozessor : AMD Ryzen 7 1800X Eight-Core Processor (4C 8T 4.09GHz, 1GHz IMC, 4x 512kB L2, 8MB L3) 95 WATT
Sockel/Slot : AM4 (PGA1331)
Is it possible to change the processor into a Ryzen 9 3900X with 12 cores.
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.
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.
Do you need to update a chipset before a BIOS upgrade for all mobos?
Depends on what BIOS/UEFI version you are updating from to the new version. The Motherboard's Support site will let you know if you need to update the Chip Set first or not. That is why it is important to read the side notes on the right hand column under each version or previous versions in every motherboard support site that you are thinking about updating.
EDIT: Just realized that you are not the original User posting the question. Deleted everything concerning ASRock since it doesn't concern you. The above is my answer to your question.