When picking a CPU be careful and read all the specs because they are not all the same. F.ex. some 7th gen i5s were only dual core, not quad.

The 8th generation processors are better, with much faster GPUs that can run many recent games in fairly high settings. They are also more efficient and have lower TDP. Some such as the mobile aimed U8250U is a very nice CPU with a TDP of only 15W, rising to 25W under full Turbo boost load. Compare that with the other i5s in the 8th gen and they have a TDP of 45W. And older chips that were up to 95W. Could be a good chip for a SFF setup.

https://www.intel.co.uk/content/www/.../i5-8250u.html