This issue has cropped up before, see the following thread(s) for a little discussion and some potential solutions-
The instructions appear to be written for a GNU version of sed whereas the mac is using a BSD version. If you’re uncertain about the sed command on a given system then man sed may help.
It’s a good heads up for working with linux/unix. Different versions can give subtle but big differences (like for example, the default python3 version that installs when you’re setting things up). These are definitely things I wish I realized earlier…