I can assure you that the motherboard does not support both DDR4 and DDR5. DDR4 and DDR5 are physically incompatible by design so a motherboard can only support slots for one or the other. Intel's current motherboard chipsets (B660, Z690, and Z790) each have both DDR4 and DDR5 offerings but the physical models themselves (such as this Z690 which is DDR4 only and this Z690 which is DDR5 only) may look very similar but are decidedly one or the other in what RAM they support. You'll want to make absolute sure that the exact model you're getting does support DDR5 as there is no BIOS setting that will make DDR4 sticks fit into DDR5 slots or vice versa.
I don't want to come off as unnecessarily harsh but I definitely don't want you accidentally buying parts that aren't compatible with one another!