Monotonicity refers to the interval in which the function must be continuous. Just like the above question, if you take the union sign, it means that the function is monotonous in this interval, but there will be a breakpoint in the middle, that is, the interval of (0, 1) is not monotonically increasing. In layman's terms, connecting two intervals with a U violates "monotonicity".
It cannot be said that f(x) increases monotonically in (-2,1) u (3,5), because the value at x= 1.5 is greater than that at x=3.5, which directly violates the "increasing function" and indirectly violates the "monotonicity".
I hope you succeed in the college entrance examination!