I’ve done it both ways, with the one time I sand first I was doing a tank transfer from my 60 into 90 . Still pushed the bottom rocks and wiggled them into place so as to not tumble. But most people do rock first.
Honestly you can do any of the three. I personally dont like bare bottom in reef tanks....
Just make sure the rock is on the glass to prevent accidental land slides due to fish or cuc burrowing into the sand under the rocks.
I've always done sand then water then rock after it has time to filter out and clear. I don't want any of that silt alive or dead near my rock. Think of the sand as grout for your tile. You can twist the rock into touching the glass.