What processor should i use to stop lagging

i have a Intel Core i5 8th gen but it lags a lot.

Consider 1 core per player. You can mitigate the lag by joining less populated servers. In your case you can play with 6/7 players before having major fps issues.

Consider 1 core per player. You can mitigate the lag by joining less populated servers. In your case you can play with 6/7 players before having major fps issues.

Though this will also depend on other factors too such as Ram and GPU too. Try to ensure that which ever part is running at close to 100% is the item you need to look at focusing on improving. Though do note that this is not a given just a guideline.