>>1996883now, the qr lever is still in the open position. when you opened it to get the wheel off, presumably the nut was threaded into the right place. but often , one must unscrew it some to remove the wheel easily, or you may have removed the skewer etc. so now, close the lever. if the axle is too loose or too tight, you want to position the nut by threading it so the skewer is finger-tight between the dropouts with the lever closed. then, flip the lever open and tighten the nut a half-to-a-full-turn more, then try closing the lever again. possibly you have to keep readjusting the nut until the lever engages very snugly without having to gorilla grip it. your hand muscles should be comfortable, not strained, to flip it; but a brief strain when the cam fully engages. your correct tightness is set, now undo the lever.
now the hard part. you have to pull the wheel all the way back in the dropouts while simultaneously flipping the qr lever. the hard part is that the derailleur spring will fight you and wants to push that side of the axle forward which makes the wheel crooked. when you know both sides of the axle are fully back, touching the rear ends of the dropouts on both sides, flip the qr lever closed. that's it.
you will have had to disengage rim brakes to remove and reinsert the wheel, so make sure you remember to reengage the brake now if you have rim brakes.