These answers come from my setting.
Where does the fire in a fireball come from,
The ether of the Ethereal Plane is the fifth element, also called quintessence. It is "spirit" as a substance. Ether is the stuff that spirit worlds of Feywild and Shadowfell are made out of. Ether is remarkable because it is a physical but immaterial force. Yet ultimately, matter itself is made out of involuting fundamental forces.
The ether is the weave, the responsive medium of magic. The ether can be both the natural force of gravity and the magical force of
Telekinesis.
There are four states of matter, namely four elements: earthy solid, watery liquid, airy gas, and fiery plasma. (Plasma is what the sun and lightning are made of, and is sometimes called heavenly fire.) It is possible to magically form matter out of ether.
The
Fireball spell shapes fire out of ether.
what do the components do to produce it and direct it,
There are different kinds of material components. All of them work according to sympathetic magic, where like affects like. A Divine holy symbol is a linguistic symbol, where the concept shapes the weave.
An Arcane material component works like protoscience, where different objects of nature have affinity with different types behaviors. Thus influencing the object can induce the related influence. For example, in reallife ancient Roman magic, an agate stone with encircling rings seemed like it was an entrapping something, thus agate stones could be used medically to stop scorpion poison from spreading. Similarly, an amethyst stone appears as wine freezing in place, thus can be used to prevent the intoxication after ingesting alcohol. The name a-methystos, literally means "not drunk" in Greek. And so on, Arcane magic is figuring out which things of nature produce which desirable effects. A magic wand is like an Arcane sophisticated high-tech equipment.
The listed material components for the
Fireball spell are bat guano and sulphur. Both are Arcane objects of nature that have affinity with the element of Fire, as fuel and volcanism respectively.
why is it the size and shape that it is,
The
Fireball is an explosion of fire, blasting outward from central point of ignition.
how can it work underwater or in a vacuum,
Not sure, but two explanations are: the Water becomes hot steam, or the sudden Fire pushes the water out of the way similar to an underwater blowtorch.
In a vacuum the fire is momentarily present before it disperses.
how is it impossible to screw up delivering the components, why is it that only some people can do it and not others.
Disturbing Arcane material components is analogous to disturbing the chemicals during a chemical reaction.
Not sure what you mean by the second question, but perhaps some people are more knowledgeable about chemicals and know which chemicals to disturb.
All that stuff goes completely unaddressed except for some vague reference to the "Weave" which is equally bereft of any real narrative justification beyond "it exists to justify magic".
The narrative is there in the D&D tradition, even if it is more like echoes via inspirations from various earlier fantasy novels, and occasionally from reallife grimoires that describe how to cast spells.