Some mild spoilers for Midsommar if you haven’t seen it.
In the movie, it is stated that the festival is held every 90 years, and they’ve held it 30 times, so it’s been going for 2700 years. This means that it started in the 27th century BC. While the cult and village in Midsommar are fictional, were there really human sacrifice cults in Sweden from ancient times? If so, what were they like, and how long did they survive? And finally, how did they die out, assuming they did indeed exist.
Disclaimer: I've not seen the movie, just the trailer and some bits.
Anyway; pre-Christian religious practices of Scandinavia are largely shrouded in darkness; few foreigners visited Scandinavia in the Viking Age and wrote down what they saw. Scandinavians themselves had a writing system (with runes) but only used it for short (and often formulaic) inscriptions. It's not believed that runes had much religious/cult significance in themselves independent of what the writing said. (So that's one thing the film seems to get wrong)
But animal and human sacrifices are in fact one of the religious practices we know for sure went on. In the stories from and about the Viking Age (800-1050) written down a few centuries later, there are human sacrifices mentioned and referenced. For instance the legendary king Domaldi of Sweden supposedly sacrificed himself after years of failed harvests. (depicted in an enormous painting by Carl Larsson) Although Domaldi is by no means considered an actual historic figure by today's source-critical historians; the implied religious value in a king sacrificing himself to the pagan gods would be an effective thing is probably true. In the poem Hávamál which dates back to the Viking Age (in part at least) the god Odin famously sacrifices himself to himself. The contemporary cleric Adam of Bremen, writing in Germany (and not a first-hand account) wrote in the late 11th century about the sacrifices that were still going on at the pagan temple at (Old) Uppsala in Sweden, which he was quite unhappy with of course. The Arab traveller Ibn Fadlan, ran into "Rus'" who are commonly believed to have been vikings, and most likely from Sweden or Gotland, on the Volga. He gives an eyewitness account of a ritual human sacrifice of a slave woman in conjunction with a funeral for a major leader.
Last but foremost, we have archaeological evidence of a number of probable human sacrifices in Viking Age Scandinavia, in those cases in conjunction with funerals as well. The best-known Swedish example being the "Elk man" grave from Birka, where a VIP had been placed neatly on a funeral pyre with his weapons and belongings beside him, but two decapitated bodies with their hands behind their backs had been thrown rather randomly on top of it all. The general idea is that they were his slaves (thralls) been sacrificed and thrown onto his pyre.
Now per Adam, there were annual feasts at Uppsala with sacrifices of a man (and two animals) every day for 9 days of festivities, and the bodies were supposedly thrown in a spring. There is reason to believe this part of his account may be exaggerated; he did have motive to do so. In any case, if there are any such mass-graves of sacrificed people and/or animals, they've not been found.
Putting sacrifices - both people, animals and weapons, in bodies of water was a ritual practice that does date very far back in time in Scandinavia, at least to the Bronze Age if not the Stone Age, and occurred until the end of the Viking Age. Just to name some older examples, the well-preserved Tollund man from Denmark is often thought to have been a sacrifice, as was the "Elling woman" found nearby, both of which were from around 300 BCE.
The oldest such case known is the "Wild Strawberry girl", a girl in her upper teens found in a bog Luttra in Sweden, who (based on the position of the bones) is thought to have had her legs tied when she was deposited in what was a shallow lake at the time. (too shallow to have drowned in) Her body has been C-14 dated to 3,000 BCE, give or take a century.
There's nowhere near enough such bodies to definitely establish a continuity from then to the Viking Age, but there was definitely a continuity from the Bronze Age (Nordic Bronze Age: 1700–500 BCE) ritual deposits forward.
Anyway, so human sacrifices happened. It wasn't a cult but part of the general religion. We don't know how often they happened but it seems uncommon in comparison to animal sacrifices, and even animal sacrifices and weapons tend to be reserved for high-status burials. (A 'middle class' grave might have trinkets like glass beads, combs etc) We don't know how the actual sacrifices were performed though; again we have very scant details about religious practices.
Another thing I know that film has is the so-called ättestupa. Supposedly a designated cliff that local old people would throw themselves off of to not burden their families with their care in old age. This way they get to go to Odin which they supposedly wouldn't if they died of sickness.
Today's historians view this as pure make-believe. The term is a modern Swedish rendering of Old Norse ǽttarstapi which appears in the Icelandic Saga of Gautrek, which takes place in pre-Christian Västergötland in Sweden. It was written around 1300 and the existing manuscripts are a century younger, and was part what'd become an Icealndic literary genre, Fornaldarsögur (tales of old times).
Now, the story about this in Gautrek's Saga, where nearly all of Skafnörtungr's family throws themselves off it in the end, is pretty silly. There are many silly and unrealistic elements in the saga; and it's a late story. It's not deemed a credible source on Viking Age history today. Also, even in the story the ǽttarstapi is one specific cliff and it's not made out to be a general concept nor practice. But it was taken seriously by 17th century Swedish historians when they first translated it (with the help of Jonas Rugman, an Icelander who was captured by the Swedish navy with the manuscript of Gautrek's Saga in his possession and who was taken to Sweden and made a teacher of Old Norse). So it was belatedly incorporated into Scandinavian folklore, and a century or two later there were dozens of villages with stories that this-or-that sheer cliff in the vicinity had once been an ättestupa and was being called that. Early 19th century writers like Erik Gustaf Geijer nevertheless took them seriously and the myth reinforced itself. Today it's been observed that zero such names were ever attested prior to the Saga being printed and the ättestupa is a complete myth as far as today's historians are concerned.
Human sacrifices came to an end with the christening of Scandinavia, which in Sweden was complete in the 12th century. Large-scale ritual sacrifices may have ended even earlier, as political and religious power were intertwined and kings converted earlier.
There is a story in Hervarar Saga of Blot-Sven, a brother in law of the Swedish king Inge the Elder, who in the 1080s was made king by pagans around Uppsala who were upset that the christian Inge would not perform sacrifices (blót) and therefore put "Blot-Sven" on the throne (as 'Sven' is both a name and the word for 'young man' as well as 'servant' it's unclear whether the nickname is for a person named Sven who sacrificed, or a young man, or one who was a servant at sacrifices ) for three yeras before Inge could muster military forces from the then more-solidly-Christian parts of Sweden and defeat the usurper. Again, historians are skeptical of what sagas say, but the Roskilde Chronicle does describe pagan unrest in Sweden at that point in time.
In any case, that's more or less the last reference to anyone actually performing a blót in Sweden; although it's not said what kind of blót it was.