I would like to know how something will taste, before cooking and trying it. Is it possible? Sometimes ingredients are too expensive for experimenting.
You have two fairly different questions here: flavor pairing (what combinations taste good), and prediction of flavors.
Eat as diversely as possible. Try things with different ingredients and combinations of ingredients. It's best if it's something you've cooked, so you know exactly what goes into it, but even eating in restaurants helps, especially if you look carefully at menus and at what you're eating. Eventually you'll learn your personal preferences better, and develop intuition for what everything tastes like.
There's really no substitute for this in the end, because everyone has different preferences, so ingredients and combinations that taste good to you might not quite line up with what others like. And besides, it's not really possible to describe flavors meaningfully, so even if someone tells you "you'll love strawberry and vanilla together", you ultimately have to just learn the flavors to be able to predict how it'll taste to you.
Specifically on combinations, see this previous canonical question. The summary is that again, this can be pretty personal, but insofar as there are common preferences, it's difficult to generalize. Most useful resources end up being long lists of pairings you might like, just slightly more general than looking for recipes that contain one of the ingredients and seeing what else is in them.
This is a research topic, exactly studying what you asked. It's called food pairing, the theory behind foodpairing is that, the more common the flavor molecules of two ingredients are, they can be better combined.
Please note that, in average we're talking about 200+ volatile flavor molecules per ingredient.
I don't know of master list. You pretty much can't know how it will taste before cooking.
Follow recipes and develop a pallet.
If you would like to add something to a recipe next time you cook it pull a small amount to the side and add what you would like to try.
If it is a whole new recipe then just make a small amount.
Onion should not take over a dish unless it is the dish. Onion adds to many dishes but you need to adjust how much you used and how much you cook the onions.
Tomato is pretty powerful. I would not use it with light fish but some people do. I would not think the tomato and cucumber would work together but they do.
I use hot peppers with a lot of dishes including tomato sauce. But I would pretty much never use it with meat, fish, or poultry.
As you get along you can try some weird paring. At the high end you are expected to have some contrasting flavors. But this is more for high end cooks. On Master Chef the panel often says I don't know how they are going to make that work and it often does come out great.