They can be combined by having a common enemy. Suppose there is a new dark force that threatens both the wizarding world and Lucifer's world. Harry Potter and Lucifer Morningstar would then have to team up to fight it. This would bring together their different powers and ways of thinking. Also, a character from one world could be cursed to live in the other world, which would create interesting storylines as they try to adapt and find a way back.
In fanfiction, the combination could be done by introducing a new prophecy. The prophecy could state that only by the union of the power of the wizarding world (represented by Harry Potter) and the power of Hell (represented by Lucifer Morningstar) can a great evil be defeated. This would force the two to interact, whether they like it or not. And as they work together, they would learn from each other's strengths and weaknesses, and their different moral compasses would be put to the test.
Harry's Patronus charm, which is a manifestation of positive energy, could have an interesting reaction when in the presence of Lucifer. Since Lucifer is associated with the underworld and negative forces in a way, the Patronus might act as a counterbalance or even a repellent to some of the darker aspects of Lucifer's world. At the same time, Lucifer's power to see people's desires could help Harry understand the motives of his enemies better. For example, if they were facing a dark wizard who had some hidden desires that were fueling his actions, Lucifer could reveal those, and Harry could then use that knowledge to find a way to defeat the wizard using his magic.
The settings can also be combined. Picture a scenario where the Forbidden Forest in Hogwarts is used as a training ground by Kakashi for the students. He could set up ninja - like obstacle courses among the magical trees and dangerous creatures. This would bring a whole new dimension to the Hogwarts experience.
The worlds can be combined by having characters cross over. For instance, Superman could be called to Hogwarts to help deal with a dark wizard who has powers that are beyond the normal magical abilities. His invulnerability would be a great asset in battles against dark magic.
One way is through magical items. For instance, a magical object from the Harry Potter world like the Philosopher's Stone could end up in Tinkerbell's world and she has to protect it from the dark fairies. Or vice versa, a fairy magic item could find its way into Hogwarts and cause a stir.
Another way is to have a character from one world be magically transported to the other. Let's say Nick Wilde from Zootopia is suddenly in the wizarding world. He could use his wits and charm to navigate through Hogwarts, and maybe even help Harry and his friends in a tricky situation. Or a Hogwarts student could end up in Zootopia and have to adapt to the new environment using their magic in unique ways.
Another way is to blend the magic systems. The magic in Harry Potter could interact with Neji's chakra - based abilities. Maybe a spell could enhance or disrupt Neji's Byakugan. In a fanfic, a powerful wizard could try to study Neji's chakra network, thinking it's a new form of magic. And Neji could learn some basic spells and use them in combination with his ninja techniques for a more powerful effect.
One way is to give the Tyranid some sort of immunity or reaction to magic. For example, the magic in the Harry Potter world might actually enhance the Tyranid's abilities in some ways, and the characters in the wizarding world have to figure out how to deal with this new and dangerous situation. The combination could also involve the Hogwarts houses having different strategies to fight the Tyranid, like Gryffindors leading the charge while Ravenclaws figure out the Tyranid's weaknesses.
One interesting crossover could be a scenario where Harry Potter is transported to Lucifer's world in Los Angeles. Maybe he needs Lucifer's help to defeat a new kind of dark magic that has some connection to the infernal realm. For example, a dark wizard has made a pact with a minor demon and is causing chaos in both the wizarding world and the human world. Harry, with his knowledge of magic, and Lucifer, with his understanding of the supernatural in his own realm, could team up to solve the problem.
Well, in some fanfictions, Lucifer Morningstar could be curious about the magic in the Harry Potter universe. He might visit Hogwarts in disguise and cause chaos. He could interact with Dumbledore, who would be very cautious of him. There could also be a fanfiction where Harry Potter and his friends have to go to Hell (Lucifer's domain) to retrieve a lost magical artifact and face all kinds of devilish challenges along the way.
One effective method is to focus on the characters. For instance, having Hermione study the technology of the Transformers. She could be fascinated by their advanced systems and try to find parallels with magic. Or, Megatron could see the power of magic in Hogwarts and try to use it for his own evil purposes. Also, the setting can play a big role. Hogwarts could be a place that the Transformers need to protect because of some hidden power within it that the Decepticons want.