As a rule, the memory with the higher numbering is always faster than that of the preceding RAM!
In the overall performance measurement, DDR5 is faster than DDR4, but it is also important whether you use dual or single! In the single channel it is one memory, with dual i.e. two memory slots modules in the dual channel you achieve twice as much. So 2 x DDR4 can be faster than 1 x DDR5.
But not every type of application will benefit from the higher bandwidth of DDR5, for example if you do daily tasks with Microsoft Office, the acceleration will be around 5% - 10%.
With memory-intensive applications, games, compression, ... there are of course higher advantages!
Here are the most common DDR4 and DDR5 data transfer rates
DDR4 data transfer rates: (max ~50GB/s)
DDR4 2133: 17 GB / s
DDR4 2400: 19,2 GB / s
DDR4 2666: 21,3 GB / s
DDR4 3200: 25,6 GB / s
DDR5 data transfer rates: (max ~100 GB/s)
DDR5 4800: 38.4 GB/s
DDR5 5200: 43.2 GB/s
DDR5 6000 48.0 GB/s
DDR5 6400: 51.2 GB/s
DDR5 7000 56.0 GB/s
These are the values for single channel in dual -Channel double as an example: DDR5 6400: 51.2 GB/s x 2 = 102 GB/s. The prerequisite is that it supports the CPU and the mainboard!
More tips and links on memory, RAM, ... and SO!
Higher memory speed is always good, here you can find more information about RAM, memory and Co.
►► Data transfer rates for DDR2, DDR3, DDR4 and DDR5 how fast?