Fremdscham
Etymology
German, from "fremd" ("someone else’s, foreign") and "Scham" ("shame"), so literally "other-people’s-shame." It is a relatively recent coinage, added to the Duden dictionary only in 2009. That late arrival shows the labelled concept is fairly new even in German.
noun · /FREMT-shahm/
The cringing embarrassment you feel on someone else’s behalf when they humiliate themselves.
What it names
Secondhand shame — squirming at another person’s blunder even though it isn’t yours.
Example
I had to leave the room from sheer fremdscham during his rambling best-man speech.
Related idea
English “secondhand embarrassment” captures it, but only as a phrase, not one word; schadenfreude is its darker cousin — pleasure, rather than pain, at another’s expense.