A nightly backup restores to midnight, and recovering to the moment before a bad migration needs the binary logs since then.
$ mysqlbinlog --start-datetime='2022-06-14 00:00:00'
--stop-datetime='2022-06-14 09:40:00'
binlog.000412 binlog.000413 | mysql
# and the settings that have to be right BEFORE you need it:
# log_bin = ON
# binlog_expire_logs_seconds = 604800 (7 days)
# binlog_format = ROW
# server_id set
# a --stop-position is more precise than a datetime, and
# needs the position from the binlog itself.
The retention setting is the one that decides whether this is possible, and the default in some configurations is short enough that a Monday morning problem cannot be recovered to Friday. Row format is required for a reliable replay and is also what makes the logs large, which is the trade that gets made by whoever set up the server and rarely revisited.