His elder brother played a role in his success
By the age of 10, Bach was an orphan. Johann Christoph, his older brother, took him in. Johann Christoph was a musician like his father and had studied organ with the renowned Johann Pachelbel (of Canon in D, which you have probably heard at a wedding). Johann Sebastian reportedly received his first formal keyboard instruction from this Christoph, who had previously studied under the well-known keyboard composer Johann Pachelbel. The young Bach performed well in school once more, and in 1700, his singing ability earned him a spot in a select choir of underprivileged boys at the Michaelskirche school in Lüneburg.
He picked up several useful music lessons at his brother's house, including how to play the clavichord and how to play the organ at St. Michael's church. The musician's brother taught him a lot of his early music. He also replicated musical genres and styles, some of which were personal, that he had heard his brother perform. J.C. sealed away the score. J.S. would stealthily remove the manuscript at night and duplicate it by moonlight. He continued this for six months before J.C. discovered him and caught him, taking both the manuscript and J.S.'s copy with him. J.C. did continue to support the musical education of his younger brother.
While residing with his brother, Bach also picked up knowledge of Italian, Greek, Latin, and French.