Use of the を and に particles together with nouns


I'm not talking about を に する but rather に をする

So

NounAにNounBをする

Examples: 恐怖に体を固くする

How one should take that sentence? I've seen some TL mark is "By" but I don't
understand why?

