There are many possible approaches and types of styles that vary depending on the historical period and cultural changes. There are even subgenres of types.
I will try to summarize briefly, off the cuff and roughly:
Baroque, which occurs between the 1600s and the first half of the 1700s. A music that still retains a great Renaissance influence in its melodies, which showcases the virtuoso skills of musicians with continuous compositional changes, and aims to display the first intentions of instrumental improvisation as no one had done before. Composers: Johann Sebastian Bach, Antonio Vivaldi, Henry Purcell, Friedrich Handel, Claudio Monteverdi, etc.
Viennese Classicism, which goes from the second half of the 1700s until its end. Precisely, the name refers to the first wave of Viennese composers, such as Mozart, Beethoven, Haydn, from whom many of the most famous, appreciated, and important compositions of all time originate.
Romanticism, which is the period from the 1800s to the early 1900s. Composers completely change their way of composing, focusing first and foremost on the expression of their own feelings, setting aside standard rules and pre-established harmonic forms in order to achieve this goal. The emphasis on emotionality, on melodies that are sometimes melancholy and 'self-pitying', takes over. Musical forms such as the nocturne, the romance, and the "lied" are born. Romanticism is divided into two periods; the first includes composers such as Giuseppe Verdi, Franz Liszt, Niccolò Paganini, Schumann, and many others. The second period, the "late" one, includes Tchaikovsky, Johann Strauss, Edvard Grieg, Gustav Mahler, Debussy, and so on. The piano is the instrument around which much of the compositions are centered; in fact, some of the greatest pianists in history come from this period, such as Frederic.
Impressionism - Exactly like Romanticism, classical Impressionism transfers the characteristics of the Impressionist art movement into music, but it is a much narrower subgenre. In its compositions, there is a sort of abstract, sometimes indefinite search for structure, in which composers want to imprint the most fleeting sensations, the "impressions" of certain moments. For this reason, pieces are often characterized by a short duration. The most well-known is Erik Satie, then there are Alexander Scriabin, Paul Dukas, and Arnold Bax.
The 20th century, in which there was the transition from the "classical" movement to the "contemporary" one. Historical events, cultural revolutions, and innovations lead to entirely new ways of conceiving music; the concept of futurism also flows into it. Other stylistic elements that were not conceived at all before are highlighted, namely dodecaphony, atonality, and early dissonances. Simple beauty and harmony, which were so sought after centuries ago, are no longer necessarily considered the primary objectives of music here. Some of the most important composers of this transition are Richard Wagner, the so-called "father of modernism," Igor Stravinsky, Dmitri Shostakovich, who had numerous problems with the Soviet government due to his compositions being outside the canonical ranks, Maurice Ravel, with his famous 'Bolero', Béla Bartók, Arnold Schoenberg, Anton Webern, and Olivier Messiaen.
Contemporary - All classical music that spans the 1900s century starting from the end of the Second World War until the beginning of the 21st century. The same criteria that emerged during the transition to modernism are taken and continued in contemporary music. The movement of minimalism establishes itself, of which Philip Glass, Arvo Pärt (sacred minimalism), and Steve Reich (modern minimalism) are the pioneers. Furthermore, new technological possibilities give rise to musical experimentalism, from which the very first electro-acoustic / electronic experiments are proposed. In this regard, there is a tendency to work more on reasoning rather than on the musical aspect; the composers of this period are not only musicians but also theorists. Therefore, contemporary music also branches into the subgenre of avant-garde classical music, a music determined to experiment, study, and invent new criteria never realized before. In this field, Karlheinz Stockhausen is recognized as one of the most important composers/theorists of the century, since he is credited with the invention of electronic music. He was the first to succeed in creating music through analog electronic processes. Other important names are John Cage, the creator of the 'prepared piano', and Iannis Xenakis, a theorist who applied mathematical, even architectural, criteria to music. Then there are Pierre Boulez, Bruno Maderna, Luigi Nono, and Edgard Varèse.
For the 21st century, there is a nice section
right in this forum.