You said paint so I will assume you mean paint.
First, your primer coat is extremely important. Painting directly over sanded wood is not going to fare well. Spray paint from a can will go on nicely if you have fresh product and you know how to operate it, but is a very very fine layer. You need a substantial sandable primer coat that bonds to the surface. Then you lay the paint on top of that.
If you do spray can them, practice your technique on something else. Apply the paint in several very thin layers. Never try to cover something on one pass. Also, if you use a back and forth motion, let off the nozzle at the beginning and end of the motion or you will get an extra thick layer where you stopped and went back in the opposite direction. ANd, when the can gets toward the end, get a new one. Cans tend to spatter when they start running low. Same on starting a fresh can. Spray it to clear the nozzle of any crud.
Also, unless you use some crazy epoxy kind of paint, it's gonna be prone to damage. Even a strong poly finish won't offer great protection.
Second, varnish is from the 50's. Modern sealant is some form of polyurethane.