My Hero Academia has had four different movies, as of this writing, and it has been stated in the past that they are part of the franchise's canon, which generates a possible contradiction with the ending of the 2019 film, Heroes Rising. That is the fact that, during the climax of the movie, Izuku "Deku" Midoriya shares his One For All with his friend and rival, Katsuki Bakugo, which, on paper, contradicts the ending of the series.
The potential contradiction is that Bakugo should have had One For All and Deku shouldn't have been able to hand it over to Tomura Shigaraki during the final My Hero Academia arc if he already did it in the past. There is no clear-cut answer in the series, which is a problem, but there is room for interpretation when analyzing the lore and mechanics of this legendary Quirk in the story.
Disclaimer: This article contains spoilers for the series. Any opinion expressed here belongs to the author.
Explaining whether Heroes Rising contradicts the ending of My Hero Academia or not

As mentioned earlier, during the climax of the second movie of the franchise, Heroes Rising, Izuku "Deku" Midoriya hands over One For All to Katsuki Bakugo and they manage to defeat the main villain of the film, Nine. However, when considering that this story is part of the canon of the franchise, it is understandable if it contradicts the ending since Izuku later on still had One For All and even handed over to Tomura Shigaraki in the final arc.
It is worth pointing out that the story never explains how Deku still has the Quirk and the most likely answer, at least outside the story, is that author Kohei Horikoshi never bothered to add this factor when writing his manga. After all, Heroes Rising is a movie that is meant to capitalize on the success of the franchise and a one-off story, so, logically, the author didn't plan for this event to take place.
When focusing on the actual series, there is an argument to be made that One For All, due to its sentient nature, only chose to be shared with Katsuki Bakugo for a short amount of time. It doesn't fully work with the inner logic of the film, but there is also an argument to be made that the canon events of Heroes Rising could be different in the manga than in the movie.
The nature of One For All

It is worth pointing out that the very nature of One For All is different from any other Quirk in My Hero Academia, which plays a major role in this discussion. There has been evidence that this power reacts differently to those who already have Quirks and those who don't and also features different reactions depending on the way that is transferred, as evidenced by how Deku and Shigaraki received it.
Therefore, it is easy to imagine the possibility of this power being passed temporarily, even if it doesn't happen very often. It would explain why Bakugo lost it and even the vision of the All Might vestige he had when fighting Shigaraki in the final arc.
Final thoughts
From a strictly specific perspective, My Hero Academia never explains how Bakugo got One For All in the Heroes Rising film and how that doesn't influence the events of the final war arc. However, it can be interpreted that the Quirk itself, because of its sentient nature, was only shared for a moment and then returned to Deku.
Related articles:
- Deku's lack of effort in My Hero Academia's ending may be more fitting than fans realize
- One villain's Pro Hero potential exceeded any other in My Hero Academia (& it's not Shigaraki)
- Who is Dark Might in My Hero Academia? The fourth movie's antagonist, explained
- Most impactful part of Toya's transformation into Dabi in My Hero Academia is what fans didn't see