Some teachers mistakenly believe that beginning a sentence with but is ungrammatical. It’s not.
Merriam-Webster published an article about this topic on their website. Their point of view couldn’t be clearer:
Firstly, has it ever been wrong to begin a sentence with and or but? No, it has not. We have been breaking this rule all the way from the 9th century Old English Chronicle through the current day. Many translations of the Bible are filled with sentence-initial ands and buts, and they even may be found in some of our more beloved—and prescriptive—usage guides. The 1959 edition of Strunk and White’s The Elements of Style begins two sentences in a row with these prohibited words, and does so with nary a trace of self-consciousness.
Is it Ever Okay to Start a Sentence With 'And'?