I would use something like this (concrete example for Stephen Morris's answer although I don't use a cursor). This will generate the command to use in the CMD output for the second query.
However, are you not able to use the "Notifications" tab on the job itself? That would be easier.
https://learn.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-update-jobstep-transact-sql?view=sql-server-ver15
/** Find your JobID here **/
SELECT J.job_id, J.[name]
FROM msdb.dbo.sysjobs AS J
DECLARE @JobID UNIQUEIDENTIFIER
SET @JobID = 'F6F5DBF7-18FD-49D5-B018-81A55010C59D'
/** GET LIST OF ALL STEPS HERE **/
SELECT S.step_id
, S.step_uid
, S.step_name
, S.on_fail_action
, S.on_fail_step_id
, CMD = 'EXEC msdb.dbo.sp_update_jobstep @job_id = ' + QUOTENAME(@JobID, '''') + ', @step_id = ' + CONVERT(NVARCHAR(20), S.step_id) + ', @on_fail_action = 4, @on_fail_step_id = <STEP HERE>;'
FROM msdb.dbo.sysjobsteps AS S
WHERE S.job_id = @JobID
--AND <Additional filtering?>
ORDER BY S.step_id