The YAML in /etc/netplan tells you what you asked for. It does not tell you what you got.
netplan status
netplan status --all
The docs describe it as a query of the running system’s network configuration in a human-readable form. You see each interface, its state, addresses, routes and DNS settings in one place and it beats stitching it together from ip addr, ip route and resolvectl.
Add --all to include inactive interfaces. Name an interface to look at just that one. For scripts there is -f json or -f yaml.
netplan status -f json
I reach for it right after a netplan try, to confirm the machine really has the address I typed.
I like the JSON output for scripts, because a tool can read it. For a quick look the plain version is clear enough, and much shorter than the pile of ip commands it replaces.
Caveat: the docs say it uses systemd-networkd as its data source. On a desktop where NetworkManager does the work, expect less detail, and keep ip around for the full story.
Further reading: Netplan docs: netplan status, On this site: netplan try rolls your network change back if you lose the connection, On this site: ufw status numbered lets you delete a rule by its number