Miracles should not be pursued. But they come naturally as part of perfection
One cannot think we have reached perfection without having some miracles occurring daily
What is not to be done is – mantra for siddhi, or fasting or tapa for miracles. Having said that most people follow the route of tapa mantra etc to gain success or power of some sort. They use it to impress others and eventually become beggars in this life or next life