If you want to cook a reasonably wide variety of dishes and minimize the chance that you don’t have an important spice ingredient, without accumulating jars of stuff that go stale without use, these are the spices and flavorings you should buy:
Salt
Ground cumin
Ground coriander
Paprika (optionally, also smoked paprika)
Dried Italian herb blend
Black pepper grinder
Chilli flakes
Chinese-style chili oil
Harissa
Fresh garlic
Toasted sesame oil
Soy sauce
With these ingredients, you can cover a wide variety of cuisines and dishes will taste reasonable even if you are missing some of the recommended spices.
Italian → black pepper, garlic, chili flakes, Italian herb blend
Spanish → smoked paprika, garlic
Mexican → cumin, paprika, chilli flakes
Indian → cumin, coriander, chilli flakes, garlic
Chinese → garlic, sesame oil, soy sauce, chili oil
Middle-Eastern → harissa, garlic, cumin
As an aside, when I was a kid I used to have a cooking blog that I have since wiped from the internet (for no particularly good reason). Perhaps I should restart and post more cooking-related things here also.