Assalamu Alaikum Brothers in Islam,
How could our beloved Prophet Muhammed (saw) see the punishment of the hell fire and that most inhabitants would be women and other aspects of the after life, when the judgement day hasn't arrived yet?
We have evidence of the Prophet (SAW) seeing the people of Paradise and Hell-fire:
The Prophet (ﷺ) said, "I looked at Paradise and saw that the majority of its residents were the poor; and I looked at the (Hell) Fire and saw that the majority of its residents were women." (Sahih Bukhari)
We also know the gates to paradise (and by extension also Hell) will only open after the Day of Judgement:
The Messenger of Allah (ﷺ) said: Amongst the apostles I would have the largest following on the Day of Resurrection, and I would be the first to knock at the door of Paradise. (Muslim)
The logical conclusion from this is that Allah showed the Prophet Muhammad (SAW) a future vision of Paradise and Hell.
There are many other examples of the Prophet (SAW) knowing the future:
Different evils will make their appearance in the near future. Anyone who tries to disrupt the affairs of this Umma while they are united you should strike him with the sword whoever he be... (Muslim)