Ludwig van Beethoven.
It is not confirmed which composer wrote the first sonata, as sonatas were created a long time ago. However, it is hinted in history that Arcangelo Corelli's work was one of the first to be considered a sonata.
I believe it was Ludwig van Beethoven.Beethoven
Mozart was the composer who wrote music before he was five years old. This composer was incredibly talented and driven.