Buying gold has a virtually zero percent ban rate.
The only things to watch out for are scammers (use trusted users/websites with large donor ranks)
Safest way to purchase I would recommend to just trade and throw in different items. Staking is actually risky and there have been a lot of problems with it.
To avoid getting banned, just make sure you're not buying from some random chinese gold farming/sketchy website.
Make sure to be purchasing the gold on a played on RS account. A fresh tutorial island level 3 with no quest points, skills, or trades will get flagged.
I'm assuming you're not buying over 1b+
At higher rates the users/websites will help you with those transactions to avoid bans.