it is possible to incorrectly thread the chain through the rear mech although it shouldnt cause the wheel to jam and lock up.
is the chain the correct one for the cassette i.e. you’ve not stuck an 8speed chain onto a 9 speed cassette as the chain is slightly wider…the other way is generally fine as the chain will be narrower.
if the chain and cassette arent the matched up ones from previous use then that could be the issue
check the rear mech is working fine too and that its indexing is accurate, then check the cable tension to ensure the mech is lifting the chain far enough for the chain to sit correctly on each sprocket