Not necessarily.
Even if not entirely true today, the platform cost for AM5 and DDR5 may seem excessive. Personally, I wouldn't upgrade an AM4 build with anything not X3D-enabled, even for non-gaming
(historically, larger-cache'd CPUs stay useful/relevant for longer)
Not to mention, a simple...