Newer generations typically improve a little bit each time on the power per unit processed, even if the overall speed isn't that different. So for a given processing task, newer generations of hardware will use less electricity. If you don't pay anything for power, then the point is moot. If you have an electric bill each month, keep in mind the ongoing energy cost vs. the purchase price of a newer CPU and board.
A i3-12100 CPU benchmarks almost three times the speed of a i5-7400, while consuming less power. Even the Pentium Gold G7400 has a faster benchmark, and it uses much less electricity.