Unless there's something unusual I'm not aware of, this type of sensor is just plugged in, and off you go into the sunset. No two sensors are ever exactly alike, so the Engine Computer has strategies to compare them to each other and to engine operating characteristics, to learn the "personality" of a replaced sensor. That takes place very quickly as soon as you start driving.
There are some sensors on newer models that do need to be programmed but for most cars, that would have to be done any time the battery was disconnected or run dead. VW, BMW, and Audi do have a lot of tricks designed-in that cause computers to lock up when the battery is disconnected. That can require a very expensive tow to the dealership, but not when you're just replacing a sensor. Just be careful to not disconnect the battery.
As for cost, the only thing I've heard multiple times is if the battery is disconnected on a BMW, the total bill was over $950.00 to unlock multiple computers. Some people say that is true for some GM models too, but I've never heard anyone say that happened to their car.
SPONSORED LINKS
Tuesday, January 7th, 2020 AT 2:22 PM