Error generating rig with Rigify addon
Somehow, your metarig had become corrupted in some way. By deleting the rig and just starting again and being careful with positioning the bones, it should work as expected from the video tutorial that you were following.

***I believe the mistakes you made that could have corrupted were extruding the bones from the foot bone to make extra bones there which swapped the parenting around in a way that conflicted with the python scripting that comes with the Rigify addon.

There was also an elbow bone called Bone that had been created by mistake along the left arm. After trying to generate the rig and coming up with errors, the original metarig, even after undoing it, had become corrupted after that. It's always just better to start again with the rigging process if you suspect any corruption in an object. It saves time in the long run.***