The commencement of Ramadan is established by the sighting of the crescent. When the crescent is sighted after sunset on the twenty-ninth day of Sha’ban, it indeed indicates the commencement of Ramadan.
However, if the crescent was not seen after the sunset on the eve of the thirtieth day, due to cloudy weather, or dust or smoke in the air, then Sha’ban will be counted up to thirty. The Prophet ﷺ said: “Fast when it (the crescent) is seen and break when it is seen, but when it is obscured from your sight, then complete the count up to thirty.” [ Agreed upon.]