How to substitute the ubiquitous onions if you can't have or can't stand.
Have you noticed how the vast majority of recipes start with the line: "Chop the onion..."?
This may involve different types of onions (red, white, shallots, spring onions/scallions,...) or other members of the allium family (garlic, leeks, chives,...) but the first step of chopping and softening onion in some kind of cooking fat is so ubiquitous for a reason.
Delicious flavour depends on layers, each layer adding a new dimension, from depth to brightness: one dimensional flavour gives you that taste of 'meh'.
And onions are an ideal first layer: the heat and fat softens, sweetens and deepens their flavour. Using onions in the base layer of your dish will add depth and body to whatever you are cooking, while the onion flavour melts into the background (it's not about the onion flavour, it's about complexity).
But what if you can't eat onions? What if they cause digestive upset(*), or you simply can't stand the flavour of onions, however subtly in the background? What if you don't have any onions to hand?
No onions, no problem! Of course, there are solutions. Nothing in cooking is ever compulsory!
Obviously, you could simply just leave out the onions. But if you don't replace that layer of flavour with something else, your dish is probably going to lack some of that depth and body that is usually the job of onions to contribute.
You don't need detailed culinary knowledge to figure this out:
We are simply looking to add depth, body and savouriness, so let's use some common sense (and some tricks learned through trial and error).
Swap in other members of the allium family (if your gut or taste will tolerate):
Different substitutes will suit different dishes and different palates - make sure you try out a few and keep experimenting!
You may well come up with some tasty surprises!
Onions (and garlic) are rich in fermentable short-chain carbohydrates (also called FODMAPs).
They are indigestible for humans (i.e. fibre, passing through the small intestine undigested) but a favourite food of your gut bugs (they will ferment and digest these fibres in your large intestine, a process which produces gases and fatty acids).
This process is normal and healthy, but if your gut lining is sensitive or compromised and/or your microbiome population unbalanced then the symptoms (gas, bloating, pain, diarrhea) can be very unpleasant (commonly labelled as IBS or SIBO).
A low FODMAP diet (the main research centre is Monash University) may be recommended. This means avoiding a number of FODMAP-rich vegetables, fruits and grains for a time, then reintroducing them one by one to determine what and how much of it causes issues. Different people can tolerate different types and amounts so it will be a very individual journey.
Something to note: these fibres are essential for gut diversity so after the initial 'cleanse & heal' phase, the goal is to reintroduce as much as possible and avoid long term sweeping restrictions.