Not to understand the problem better, but to know that it is not anyone’s or yours mistake to get an erection during a massage. Nor it is a problem– it is just common.
It is how a male’s body reacts to a female touch.
https://bluekama.com/erection-during-massage