What it actually does
Toothpaste contains mild abrasives (silica, calcium carbonate). Buff a microscratch in the oleophobic coating? Maybe, briefly. Buff a crack in the actual glass? No.
When it backfires
Cracked screens have moisture seams. Pressing wet abrasive into them spreads the crack and damages the digitizer underneath. Now your screen is worse AND has goo in it.
The right call
Microscratch on coating: leather + 70% isopropyl alcohol. Real crack: replace the screen. There is no toothpaste move that fixes structural damage.