Layer dependent magnetism and topology in monolayer and bilayers ReX 3 (X = Br, I)