I've been looking at two CPUs recently, one is a i5-8600 3.1GHz 6 Core while the other one is a AMD Ryzen 5 2600X 3.6GHz 6 Core & if so, any other decent budgeted CPU, thanks!
If it's more of a workstation get the 2600X. If it's a gaming build get the 8600. Though I recommend the 8400 if you really want a budget CPU. It'll do great for gaming.
Different workloads will have different results using those CPUs.
The 2600X is typically a better "value" (6c/12t and usually cheaper) but, for example, in a strictly gamign setup the 8600 would net greater performance more often than not.
If it's more of a workstation get the 2600X. If it's a gaming build get the 8600. Though I recommend the 8400 if you really want a budget CPU. It'll do great for gaming.