Ari Aster’s Midsommar is partially based on the real Midsommar festival celebrated in Sweden, but the customs don’t involve the same violence and pagan cult activities in the movie. Midsommar stars Florence Pugh as Dani, a college student who makes a fateful trip to a Swedish commune, the home of her boyfriend’s college friend, Pelle (Vilhelm Blomgren). Though some aspects of the real-life festival are authentically portrayed, Aster also breaks away from reality and leans into disturbing horror movie elements through Midsommar's ritual deaths. For starters, in Hårga, the characters learn that Midsummer events involve the ritualistic suicide of locals who reach the age of 72, the end of a seasonal life cycle.
https://screenrant.com/midsommar-movie-true-story-real-life-swedish-festival/