Can I get some advice because milk of magnesia (magnesium hydroxide) is not working for constipation?

Low fiber. And not enough fluids especially if much of your fluid intake is caffeine and or alcohol both of which dehydrate and constipate. Excess foods with calcium or iron such as cheeses and dairy products can constipate. Even if you ate the right foods but didn't drink the correct amount and types of fluids you could get constipated. Fluids are critical! stop the caffeine!