The Prophet ﷺ said, "Do not anticipate the month by fasting a day or two before it, unless it coincides with a fast one of you regularly observes. Fast when you see the new moon and break your fast when you see it. If it is obscured from you, complete thirty days and then break your fast."
حدثنا أبو كريب حدثنا عبدة بن سليمان عن محمد بن عمرو عن أبي سلمة
قال النبي ﷺ لا تقدموا الشهر بيوم ولا بيومين إلا أن يوافق ذلك صوما كان يصومه أحدكم صوموا لرؤيته وأفطروا لرؤيته فإن غم عليكم فعدوا ثلاثين ثم أفطروا
[Sahih]. Ahmad also narrated it, 2/497, from the hadith of Muhammad bin Amr, transmitted the same way, and its chain is hasan. Its basic content is agreed upon by Bukhari, no. 1914, and Muslim, nos. 1081, 1082.There is also a narration on this subject from some of the companions of the Prophet ﷺ [Ahmad, 4/314].