Staking means that you keep your coins in the wallet and that's all you do.
I think that you confuse staking with PoW mining.
Maybe you should read articles like
https://www.cryptoaims.net/lesson/what-is-staking-and-how-it-works/(maybe search for even better ones, I've just got a random article)
For staking the only CPU you use is for the wallet running, which should be 0 or very close to that.
Edit: setgenerate on the other hand may start CPU-mining (if it's mixed PoW/PoS), check for your actual coin devs what you are doing there. You didn't state what coin is that.