According to an encyclical written by Saint John Paul II, miracles are investigated and confirmed by the sacred congregation and are a key part in the process of canonization. The sacred congregation is a committee that is led by a cardinal prefect. They are involved in the process of canonizing saints by setting guidlines, thoroughly studying each case, and voting on it.
While investigating a miracle for canonization, the sacred congregation follows a procedure in which a case is prepared and discussed among the medical experts who study those who have been healed by a miracle. It is then discussed between a theological committee and a group of cardinals and bishops. It is finally reported to the Supreme Pontiff who has the authority to either reject or validate the case.
“Divinus Perfectionis Magister (January 25, 1983): John Paul II.” Divinus Perfectionis Magister (January 25, 1983) | John Paul II, w2.vatican.va/content/john-paul-ii/en/apost_constitutions/documents/hf_jp-ii_apc_25011983_divinus-perfectionis-magister.html.