What do you do when you experience phenomenal matters?

Where does the universal diversity come from ? Did the buddha know about these situations known and witnessed from people witnessing it back then and now?

In history people called these miracle’s but what are they really known for ? Is it maya dukkha or something more ? Are we being tested for something that we all ignor ?

Are you talking about miracles as in context of psychic powers? Or are you wondering if how universal diversity of different beings arises?

OP: “Where does the universal diversity come from?”

Universal diversity is known in Buddhism as ‘the All’ (SN 35.23). Nibbana is outside the All.

"“Monks, I will teach you the All as a phenomenon to be abandoned.”—SN 35.24