They will not physically fit. The slot is a different size, there's a different amount of pins and the alignment notch is in a different place.
Electrically you cannot put DDR into a DDR2 slot or DDR2 into a DDR3 slot or DDR3 into a DDR4 slot.
According to pc-specs, the ASRock B450 Pro4 supports a maximum of 16Gb DDR4, DDR3, DDR2.
That's absolutely wrong in every way. The B450 chipset supports a maximum of 64Gb of DDR4 ONLY.
There is not a single motherboard made, by anyone, any vendor, any possibility ever, anywhere of a motherboard that supports DDR2, DDR3 and DDR4.
Truth. Verify wherever you'd like, but pc-specs is absolutely dead flat wrong.