I do (or make sure it is done) 3 things. 1) Have fork ends that allow the wheel to be vertical and centered in the brake blocks with the bike on the floor and simply being held and sitting solidly on the front hub's axle with the quick release open. 2) I use wheels with no dish and 3) I do not tighten the quick release except when the bike is on the floor as described above. That way I know the hub axle is seated against the tops of the fork ends. This means the front wheel is always in the same place when I tighten the QR.
2) Front wheels with no dish is a no-brainer but there are a surprising number of wheels out there that that flunk. That brings us to 1). If the forks are not symmetrical side to side, someone could have built a dished wheel to get the rim centered on the bike. That wheel looks and operated just fine. But a proper wheel will sit crooked unless the wheel is rocked to one side before closing the QR. If that is happening, do some real diagnostics before you start cold-setting and filing. If you don't have these skills, go to a good shop.
Easy check for 2) wheel dish. Make sure the wheel is fully seated in the fork ends. Note where the rim sits relative to the fork below the crown. Turn the wheel around so the quick release is on the other side. Look again. On a proper wheel, the rim will be in exactly the same place.
There are thousands of bikes out there that don't pass this test. They are still perfectly ridable. When you go to put the front wheel on, hold the rim evenly between the brake blocks (or centered under the fork crown) Make sure you can feel the bike sitting solidly on one of the fork ends. Tighten the QR. Not ideal but that has been done probably a few million times.
Ben