I bought such an old computer. 6th gen i3 Intel CPU, upgraded the memory to 16G and added more storage. For me, it works well.
However, I recommend checking the power usage of the system. Some older PCs might be very piwer hungry, which makes them expensive in the long run.
Edit: 6th gen and 7th gen Intel CPUs are not compatible with windows 11. The market is full of these old PCs and they are cheam. I personally would not buy anything older.