I would suggest you when you stop beofre the light, put to P drive, because wehn I put my car into N drive the car still move ( especially on up hill and ddownhill road, there will be some probablity that the car will move) and
the one who said is right, put your foot on the brake first, than release emergency break and switch to 2/ D drive ( in corolla for instance)
If you park your car in the up hill or downhill road, make sure the sterring whell direction is correct, if downhill , move the sterring wheel to left, but up hill with curb, is right, uphill without curb is left!