In Harry Potter books Hogwarts was the home for the students , it was where they lived and worked. This analogy works because the whole cell is where different organelles live and operate.
This analogy makes sense because DNA is the genetic code that makes us what we are, like how blood status makes wizards in Harry Potter who they are (half-blood,muggleborn,etc)
In Harry Potter Grimauld Place is the HQ for the Order Of The Phoenix, where meetings where held, the “brain” of the organization, much like how the nucleus is the brain of the cell.
This analogy makes sense because McGonagall and Dumbledore are professors at Hogwarts, and support the students day to day, like how the cells wall offers support for the cells.
This analogy makes sense because in Harry Potter the Room Of Requirement was the place to hide or get rid of something. A vacole collects waste as well so it makes sense as they both collect waste.
This analogy makes sense because in Harry Potter the goblins made the best objects better than wizards could. The ribosome make things for the cell, so they both make things.