Turning on a firewall over SSH has a moment of doubt in it. Did I add the SSH rule, or just think about it?
sudo ufw show added
The man page describes the added report as the rules as they were entered on the command line. It does not show the running firewall, which is exactly why it helps before ufw enable. You see your intent on one screen.
My order of operations on a fresh server: add the rules, check them, enable.
sudo ufw allow OpenSSH
sudo ufw show added
sudo ufw enable
If the SSH line is missing, I have saved myself from a locked door. On a machine I cannot walk up to, that is worth ten seconds. By default ufw denies incoming and allows outgoing once it is on, so anything not on the list is gone.
Because the report reads your intent and not the live state, it also works as a quick review of a rule set you wrote some time ago.
Caveat: ufw may normalize rules, so what it prints can look a bit different from what you typed. Same meaning, different spelling. Use ufw status verbose after enabling to see the active state.
Further reading: ufw(8) man page (Ubuntu 24.04), On this site: ufw limit slows down anything hammering your SSH port, On this site: ufw status numbered lets you delete a rule by its number