Yes onions are still good if they freeze and you can safely freeze onions and use them later.
Freezing the onions will make them last longer and they go good in soups, stews, beans etc.
So you can buy extra onions and then freeze the onions whole or chop the onions up and place the chopped up onion in bags and then freeze them.
If you freeze whole onions they can lose their shape when thawed out but the onions are perfectly safe to eat if you freeze them.
I keep onions in the freezer and use them later for stews, beans, soups and freezing the onions makes them last longer than they would when kept out.
You can blanch the onions before freezing them or just freeze them without blanching them first.
You can also use the frozen onions to make onion rings or just deep fry the onions and have deep fried onions.