Set a trap up / set up a trap

I believe, it's a separable phrasal verb, so you could say both without changing the meaning, so I would say both are correct. A lot of phrasal verbs with two parts are separable and without changing the meaning. E.g. I picked my wife up from the airport. I picked up my wife from the airport. Or: I took my wife out to dinner. I took out my wife to dinner.

If the object is a pronoun though, then it must go between the parts of the phrasal verb. E.g. She set it (the trap) up. NOT: She set up it (the trap.)

This whole spiel only applies to two part phrasal verbs with objects though.

ALSO, set a trap means you prepare it to be sprung, whereas set up a trap is to set up the trap "mechanism" from scratch. The meaning often overlaps though.