One possible plotline could be that Harry has done something dangerous in the wizarding world, like sneaking into the Forbidden Forest without permission. Sirius, as his godfather, decides to give him a mild spanking as a form of discipline while also explaining why his actions were wrong and how they could have put him in great danger.
Maybe Harry has been misbehaving at Hogwarts, getting into too many fights or not doing his schoolwork. Sirius steps in and uses a spanking as a last resort after trying other methods of getting Harry to behave. The story could then focus on how Harry realizes his mistakes and starts to improve, with Sirius guiding him along the way. In this plotline, it's all about the growth and learning of Harry under Sirius' care. Another idea could be that Harry has been disrespectful to the wizarding traditions or to the older wizards. Sirius, being from an old wizarding family, feels the need to correct Harry's attitude. He gives Harry a spanking as a symbol of the seriousness of the situation and then educates him on the importance of respecting the wizarding ways. This would show the cultural aspect of the Harry Potter universe and how Sirius is trying to instill the right values in Harry.
A plotline could involve Harry being influenced by some dark magic or bad company at Hogwarts. Sirius discovers this and, in a moment of paternal instinct, spanks Harry to get his attention and make him understand the gravity of the situation. After that, Sirius helps Harry break free from the bad influence, perhaps by teaching him more powerful defensive magic or by introducing him to positive role models within the wizarding community. This would be a story of redemption and protection, with the spanking being a starting point for Harry's journey back to the right path.