First, you need to really understand the magic system in the Harry Potter world. Read the books carefully to note how spells work, what the limitations are, and how different magical objects function. Then, come up with an original idea. It could be a new use for an existing spell or a completely new type of magic. For example, you could create a magic that is based on emotions rather than incantations. After that, develop your characters. They should be believable and have their own relationships with magic. Start writing and don't worry too much about making it perfect at first.
To write your own 'Harry Potter magic centered fanfiction', start by choosing a specific aspect of magic you want to focus on. If you're interested in magical creatures, think about how they interact with magic. Maybe there's a creature that can transfer its magic to a wizard for a short time. Build your plot around this concept. Create characters who are either new to this magic or have a special connection to it. Also, make sure to stay true to the overall feel of the Harry Potter universe. Don't introduce magic that completely goes against what J.K. Rowling has established, but feel free to expand on it in your own creative way.