In a fanfiction, it could be that Carol Danvers is mistaken for a powerful witch in the Harry Potter world. She gets invited to Hogwarts to teach a special class about self - defense. The students are in awe of her powers. Harry Potter becomes friends with her and they discover that there are some similarities between the magic in the wizarding world and the powers that Carol has. They then go on an adventure to find an ancient artifact that is said to have the power to enhance all magic and powers.
Maybe there's a threat that endangers both the Marvel universe and the Harry Potter universe. Carol and Harry Potter team up. Harry teaches Carol about magic, while Carol shows Harry some of her combat skills. They could work together to defeat a powerful enemy that has the ability to cross between the two universes, like a dark wizard who has somehow acquired some Infinity Stones.
One possible plot could be that Carol Danvers accidentally travels to the wizarding world of Harry Potter. She might initially be confused by the magic there, but then use her own superhuman abilities in unique ways. For example, she could use her flight to compete in a Quidditch match in a very unorthodox style. And her super strength could come in handy when dealing with dark creatures.