I have changed the substrate in my tanks many times over the years, and more recently changes five of them. First, use a temporary tank (suitable container works for this if not another tank) and fill it with water from the tank and net the fish into it. It is always best to get the fish out, makes things much easier and quicker.
Save the decor (wood, rock, etc) and place it in with the fish in the temporary tank if yo can, or in another container of tank water.
Drain the tank, remove the gravel, wash the sand well, put it in. I then add maybe 3-4 inches of water and immediately siphon it out; this removes a lot of "dust." The arrange the hardscape, add maybe half a tankful of water (be sure to add conditioner to save the bacteria on the hardscape). Plant. If this stirs up too much silt, siphon out and refill, using conditioner. When everything is shipshape, do a partial water change on the temporary tank using the water from the newly-completed tank (you will have to top it up again
), or another method is to put some of the water from the temp tank in a bucket, say half full, net in the fish, and then fill with the new tank water. After maybe 20 minutes, net the fish into the new tank.