When seasoning any meat with salt, do it immediately before cooking or a couple of hours before. Why? Salt draws moisture. If done immediately before cooking, the salt is still sat, undissolved on the surface and the moisture remains in the steak, this is fine.
Between 5 minutes and an hour however, via osmosis, the salt begins to draw liquid out of the meat. The surface becomes wet. If you cook the steak between these times you use the heat from the pan to evaporate the liquid. The meat will boil rather than sear and you will not develop the caramelised crust vital for a good steak. Not what you want.
If left for over an hour the brine formed from the juices and the salt starts to break down the muscle fibres in the steak. It is slowly reabsorbed into the meat, seasoning it right to the centre. This produces a wonderfully seasoned steak. If you steak is at all damp, dab with kitchen towel before searing. If you have time, I’d suggest seasoning and allowing to rest for 2 hours or more for perfectly seasoned steak right to the centre. If you don’t, season seconds before it hits the pan.