I just got a new key from the BMW dealership. Unfortunately, remote lock/unlock still isn’t working.

It works intermittently with my orifginal key, so I’m not sure if it’s the key or the car. I assumed my other key was simply running out of battery. The new key does unlock the door/start the car no problem. Is there some procedure I need to follow to map this new key to the car?