Yeah if the motherboard actually supports 5000 series, or even 3000 series.
Most that went with cheap SKUs in 1000 and 2000 series, bought cheap motherboards too, and manufacturers did not bother releasing firmware updates to support 3000 and 5000 series CPUs. Some even claimed firmware would become too big to add the new chips...
1000 to 5000 series is a huge upgrade tho. Because 1000 and 2000 series were really not that fast. Ryzen first became good when AMD went TSMC 7nm.
Don't forget that even AMD tried to stop 1000/2000 users from using 3000/5000 on their old motherboards

They gave in at last due to community rage.
Personally tho, I don't know anyone who have made the jump from 1000/2000 to 3000/5000 using same board... Most I know cares about new features and re-using old boards cuts you off
The performance boost tho, going from lets say Ryzen 1600 to Ryzen 5800X3D in gaming would be crazy haha... 1000/2000 series were really bad for gaming