DDR4 and DDR5 physically cannot fit into the same slot as one another. So if you’re upgrading to a CPU that only supports DDR5, you’ll need to upgrade your motherboard, too.
I’d also personally get a new boot drive. Aside from the fact that you’ll be forced to reinstall your OS, which will make everything run so much faster unless it’s already something that you do frequently, they’re very cheap and consistently getting faster and faster. Not to mention that drives don’t last forever. Trust me… I write firmware for SSDs.