The script command not only makes a record of what commands you run but also allows you to save the output generated so that you can examine it later or easily turn your command sequences into scripts ...
Sudo lets you run any terminal command as another user — hence "substitute user" — but the default and most common use for it ...