AMD CPUs have an embedded memory controller, meaning that it is the processor, not the chipset, that defines what memory technologies you can have and the maximum amount of memory that is possible. The motherboard, however, may have a limitation as to how much memory can be installed.
AM4 CPUs are compatible with DDR4 (up to 2,667 MHz, depending on the modules configuration) memory. According to ASRock, the Fatal1ty X370 Gaming K4 supports DDR4 memories up to 2,933 MHz.
The ASRock Fatal1ty X370 Gaming K4 has four memory sockets. You can install up to 64 GiB with this motherboard if you use four 16 GiB modules.
In order to enable the dual-channel mode, you must install two or four memory modules. When installing two memory modules, use the first and third memory slots to enable dual-channel mode.
Figure 3: memory sockets; install two or four modules for the best performance