The beginning and ending of the Ramadan is based on the moon
that the Prophet ﷺ said or he said Abū al-Qasim said, "˹Start˺ fasting ˹the month˺ upon seeing it (the moon), and break ˹fasting the month˺ upon seeing it. If it is hidden for you (as a result of an overcast at the start of the month), then complete thirty days of Shaʿbān."
قَالَ النَّبِيُّ ﷺ أَوْ قَالَ قَالَ أَبُو الْقَاسِمِ ﷺ «صُومُوا لِرُؤْيَتِهِ وَأَفْطِرُوا لِرُؤْيَتِهِ فَإِنْ غُبِّيَ عَلَيْكُمْ فَأَكْمِلُوا عِدَّةَ شَعْبَانَ ثَلاَثِينَ۔»