Your Poké gold will still be available to use after transferring to a new device.
Even if you switch to a device with a different OS, your Poké gold will be carried over as well.
Please check the Q&A below on how to transfer your data to a new device.
Q. I want to transfer my save data to another device (device change, etc.)