how to prevent this part from rotating while fixing to another part ?

Check the attached image for the problem statement ?

3 Answers

My favorite, rectangle punched bump.

I would add additional bends to the bracket so that when it it installed it has no choice but to be parallel.

you could weld a piece of sheet metal to the mounting place as a limit stop for your angle