Your toothpaste comes in a tube because of some painters in Paris. In the 1800s, toothpaste came in a jar. And the whole household dipped their brushes into the same one. Your dad. Your uncle. Then you.
Over in New London, Connecticut, a dentist called Dr Washington Sheffield made his own tooth cream. He sold it in jars too.
His son, Lucius, spent time far away in Paris. There he watched the painters at work, and he noticed something. They didn't dip their brushes into pots of paint. They squeezed their paint out of soft metal tubes, just as much as they needed, and the rest stayed clean inside.
Here's the weird part. The idea came home with him. He told his father, and the dentist tried it: a soft tin tube, full of tooth cream.
By 1892, Sheffield's tooth cream was being sold in collapsible tin tubes. You could squeeze out just what you needed, it didn't dry out, and nobody else's brush went in. By 1896, Colgate was selling its toothpaste in tubes too.
Sources don't all agree on exactly when the first tubes appeared, or who got there first, so we won't claim a "first". What every source agrees on is the idea: a tube instead of a shared jar.
And yours still comes out the same way: one squeeze at a time.