Cordless tools: does that 18V battery really fit everything?

Short answer: no. An 18V battery from one brand does not fit another brand's tool, even with the same number printed on it. That is annoying, fairly so, but there is logic behind it.
Voltage is not the connector
Voltage only tells you how much force could come out. The connector itself is shaped differently per brand: the rail you slide it onto, the position of the contacts, and the data pin the battery and machine use to talk to each other.
That data pin is the part people underestimate. Modern packs carry protection that watches cell temperature and discharge current. Without that communication the tool does not know when to stop, and you can ruin a set of cells.
18V and 21V are the same pack
This is where most of the confusion sits. A pack of five lithium cells delivers 18 volts nominal, because a cell averages 3.6 volts. Fresh off the charger that same cell sits at 4.2 volts, and then you measure 21 volts at the terminals.
One battery, two numbers. Which one ends up on the label is the manufacturer's choice. Brands quoting 18V give the nominal voltage, brands quoting 21V give the voltage at full charge. You also see "20V max", which is a marketing rounding; physically nothing different happens.
So if a tool says it suits 18V and 21V, that does not mean it handles two different systems. It means the manufacturer lists both names for the same kind of pack.
Amp hours set the runtime, not the power
A 5.0Ah pack is not more powerful than a 2.0Ah pack, it lasts longer. There is an indirect effect though: bigger packs can deliver more current at once, so under heavy load the voltage sags less. On a drill you will not notice. On a circular saw or a polisher you keep spinning for half an hour you will.
The downside of big: weight and balance. A 5.0Ah pack under a light tool makes it top heavy, and you feel that after twenty minutes overhead.
Adapters exist, but be careful
You can buy plates that let brand A's battery click onto brand B's tool. Electrically that often works. What you give up is the protection: the tool no longer reads the pack properly and thermal monitoring drops out. For a work light that is manageable. For a tool pulling 20 amps I would not.
Practical advice: pick one system
The real gain is not in the tools but in the batteries and the charger. Someone with three machines on one platform gets by with two packs. Someone mixing three brands ends up with three chargers plugged in and always has the wrong one charged.
So when buying, look first at the platform you already own, and only then at the tool itself.
Watch out with universal machines
Tools without their own battery platform, the so called no brand or universal machines, often just say "suitable for 18V and 21V batteries" without naming the foot. That is the question to ask before ordering, because the foot decides whether your battery fits.
Our cordless polisher works with the Makita LXT foot (BL1860B, BL1850B, BL1840B and relatives) and ships with two batteries, so there is nothing extra to buy.
If you are unsure about the foot, measure the rail width on your existing pack and compare it with the photos. Ugly, but it works.