Onions and garlic are the same plant family.
It’s not surprising that if you are allergic to one, you’re allergic to the other.
Yeah I also,don’t do well with nightshades.. so not much left Ina garden I can eat lol. I do eat potatoes and tomatoes though as I can’t stand watching the tomatoes ripen and not have toasted tomatoes sandwiches 🙃