Well. one way is to do exactly what yo’re already said…
i.e. when the button is clicked, hide the first RG and show the second.
Another (probably better) way is to show/hide each RG based on a condition relating to a custom state value, and then simply set that custom state value accordingly when the button is clicked.