Question Worth upgrading?

Hi all

Recently one of my ram sticks were corrupted and I've been thinking about upgrading it. The problem is that my mobo is pretty old so it cant handle new stuff ( max is ddr4 4000 ). Is it worth more just to upgrade motherboard and get a better ram like ddr5? Thanks!

mobo specs:
https://us.msi.com/Motherboard/Z370M-GAMING-PRO-AC/Specification
Changing the motherboard to accommodate DDR5 also mean changing the CPU.

So...you're looking a a major upgrade.
RAM/CPU/motherboard....