Take a look at Monero. They were able to achieve the outcome of CPUs being the best choice for mining.
While the previous algorithm (Cryptonight) had the same purpose, ASICs eventually started to appear. However, a few years ago they changed the algorithm to RandomX, and since then, there are no signs of ASICs being used. CPUs are the best choice to mine Monero.
Extra: This answer might also be helpful to get a picture of how it works.