Not a lot of details here so I'm gonna run with some assumptions.
First assumption, you are using a quick release type axle? Even if it is a thru axle type with one of those quick release lever type ends you should first check you aren't over tightening this. It should be tight enough to be safely attached to the bike, obviously, but if you are over tightening it it can pull the legs of the fork together and thus move the caliper position inwards.
Do you have the correct width hub for the forks? The wheel should not be moving in either direction, the hub should fit nice between the fork legs with just a small amount of slack to be able to get the wheel in and out that is then tightened up with the axle. If your wheel is moving drastically across to either side then maybe your hub is too small and so there is too much space that the tightening process is closing and thus moving the wheel to one side or the other.
Both of those being correct then the only other thing you can look at is adjustment on the brake caliper itself.
The bolts holding it to the fork itself when loosened off will allow the caliper to move in and out, up and down by small amounts so as to position the caliper correctly across different bikes. So the caliper could be attached to far in one direction causing the brake pads to foul on the disc when the wheel is tightened down.
Finally if they are cable actuated discs then only one pad actually moves when the cable is pulled and one is static. The static pad can be wound in and out, towards and away from the disc with an Allen key bolt on the caliper. You should wind this in basically as close as you can get without it ever fouling on the disc when the wheel is moving but caliper not engaged. Too close will cause the brake to drag and be always on a little, too far away and the other pad has to physically bend the disc across to the static pad before the brakes properly activate which is not ideal.
Pictures may help diagnose but those are the first things I'd look into