By now, we're assuming that you've already been to see 'Hereditary' and that by clicking on this article, you're fully aware that it's going to explain - or at least attempt to explain - the ending of the movie.
So, let's get the obvious part out of the way first. Yes, the reason for the whole ceremony was that Alex Wolff's character was now possessed by the spirit of Paimon as the cult had intended all along. Paimon, as it turns out, is real - well, real in the sense of there's been books and references to the being outside of the movie - and according to them, the origin of the name Paimon comes from a tinkling sound. Is that perhaps a reference to the noise that Milly Shapiro's character made and then Alex Wolff made after the ceremony was completed?
There's a lot to take in with the ending of 'Hereditary', not the least of which the absolutely horrifying imagery of seeing Toni Collette's possessed body levitating in mid-air, decapitating itself with a piano wire, and then floating away into the treehouse where it kneels before the head of Milly Shapiro's character. As you probably already put together, Toni Collette's on-screen mother had pretty much "got her hooks" into the child and that's why you kept seeing older people waving at her at the start of the movie. There was also that creepy moment when she's cutting off the head of the pigeon - again, foreshadowing here - and turns to see an old lady across the road looking at her.
Even though she was unaware of it, Milly Shapiro's character was being groomed to become Paimon and the cult had conjured the spirit to possess her when the time came and that's why Toni Collette tells her that she was her grandmother's "favourite." It also explains the scene where she, Milly Shaprio, tells her mother that her grandmother wanted a boy. Again, this both plays into that really deep psychological level of the movie as well as the practicality of the cult - that they wanted a male body for Paimon to possess, but instead got her.
Backing up a bit, the horrific scene in which we see Gabriel Byrne's character set alight. That also points to the familial connection between Toni Collette's mother and the possession itself. Obviously, because she'd given birth to the children who were about to be possessed by Paimon, her trying to set the sketches on fire was obviously Paimon protecting them and the mother of the host. This, in a way, is an inversion of Toni Collette's character and her sleep-walking - which, one time, resulted in her pouring paint thinner over her children. You could theorise here that her unconscious mind knew what was happening and was trying to stop it before it happened, or it could be just what she said in the scene where she dreamt about herself being set on fire.
Namely, that she didn't want to have children in the first place and felt forced into it by her mother. That's really what makes 'Hereditary' such a fascinating movie to dissect like this. On the one hand, you have the mechanics of a demon possession story - as in, grandmother's secretly this weird cult leader who forced her daughter to have children so that they could be possessed by this demon she's conjured - and, on the other, you've got the subtext of parents forcing their children to meet their expectations and their own issues.
Toni Collette's portrayal is so brilliantly subtle in parts; you just get the sense that her character is so put upon by her children, that they're just an inconvenience to her. For example, she points out in the opening scene that she hasn't brought the epipen for her daughter in case she goes into anaphylactic shock - which, again, foreshadows the whole reason why Alex Wolff's character ends up driving through the night to get her to the hospital and results in her decapitation.
'Hereditary' is the kind of movie that can work on multiple levels - you can get a straightforward horror movie out of it in the vein of 'The Exorcist' and 'Rosemary's Baby' or you can dig under the skin and get at the emotional horror that just bubbles underneath it. Either which one you choose to look at it, it's going to be terrifying.