CSGO uses only 2-3 threads, so is highly dependent on single thread performance and anything that boosts that is a benefit.
It's also highly dependent on the map. If running office, I get 300fps, it's an original map so quite simple. That drops significantly in Dust II as that's a user map that has considerably more to it.
As to cooling, it depends on the temps being run. Ryzens boost according to voltages and temps, so will downclock if you start hitting into the 80's and not boost as high. There's also ram speeds and type to consider, as that'll affect Ryzens too, if you have a set running 2933MHz/C16 and your bud is running 3200MHz/C14, there's going to be a difference.
Then there's RTX and DLSS, neither of which ate supported in CSGO. Your bud might also have Xbox DVR and gamebar disabled etc.
So it's not always going to be an equitable thing between 2 pc's, even if running the same cpu as outside influences can and will change things.