Are you supposed to peel onions & garlic or not?
Yes. Peel them both
It depends what you're doing with them.
Cooking them
If you're cooking them with just heat...peel after you cook If you're cooking with heat & other ingredients...peel before you cook
I know the pho recipe I use has specific instructions to leave the skins on the onions that are used in the broth. Also, roasting whole bulbs of garlic unpeeled is a pretty normal thing to see. In general I peel, but there's specific cases for not peeling.
Depends on the meal. Roasting garlic or onions. Leave the peel on. Adding them to a roast. Either is fine.