The Pokémon franchise assigns types to its moves, in the same way it does to the Pokémon themselves, but there have been rare instances where a move's type has changed across the generations, usually due to the introduction of brand-new types that better fit them. This means that a Pokémon with the old move type will have it changed when they are traded to the later generations, as it has been changed across the board.
The Pokémon series has had lots of retcons and the series rarely draws attention to them. The introduction of a brand-new Pokémon type that has somehow altered the types of existing Pokémon is usually hand-waved away by the local population, with exclamations about how people are learning more about Pokémon all the time. Pokémon isn't exactly a hardliner when it comes to canon, and it really can't be if the developers want to keep adding new mechanics and concepts, especially ones involving existing Pokémon.
There are some moves used by Pokémon that have also changed types across the generations and these are given even less attention than the Pokémon types themselves changing. These also don't include gimmick changes, like Scarlet and Violet's Tera types in Gen 9, which may re-shape battling completely by giving Pokémon additional types. Surprisingly, only a few moves have changed over the decades, and it has happened sparingly across the generations. As detailed by Bulbapedia, these moves were changed to better reflect their effect, or to more accurately line up with a new type that had just been introduced.
Pokémon Moves That Changed Type From Gen 1 To Gen 2
There were a lot of type changes made in the jump from Pokémon Red and Blue to Pokémon Gold and Silver, the first two generations. Many of these were implemented to boost some of the first games' weaker types, while others hoped to balance the overpowered Psychic-type Pokémon in Gen 1. To this end, the Dark-type and Steel-type were introduced, which were incredibly effective against Psychic-types. This led to Pokémon like Magnemite switching type to accommodate for the changes. Despite this, the move pool only had four type changes in the jump and only one of these was to one of the new types. In Pokémon Gold and Silver, Bite changed from Normal-type to Dark-type, Gust changed from Normal-type to Flying-type, Karate Chop changed from Normal-type to Fighting-type, and Sand Attack changed from Normal-type to Ground-type. All of these type changes were logical and better represented the names of the moves.
Pokémon Moves That Changed Type From Gen 4 To Gen 5
Pokémon Gold and Silver introduced the Dark-type and Steel-type to the game (but not the first Dark-type gym in Pokémon), but it also introduced a hidden third type, which was only used for a single move. In Pokémon Gold and Silver, the move called Curse actually belonged to the ???-type and is the only ???-type in the history of the game. It's unclear why the developers went to such great lengths for a single move, but it seems they decided it wasn't worth the hassle, as Game Freak scrapped the ???-type in Gen 5 and turned Curse into a Ghost-type move.
Pokémon Moves That Changed Type From Gen 5 To Gen 6
The jump to Gen 6 introduced a new type to the series for the first time since Gen 2. In Pokémon X and Y Game Freak added a new Pokémon type, Fairy, which not only introduced brand-new Fairy-type Pokémon but also resulted in older Pokémon having their type changed, including Jigglypuff and Marill. There were several moves that also had their type changed in the transition, as Charm, Moonlight, and Sweet Kiss all had their type changed from Normal-type to Fairy-type. These are the most recent Pokémon moves to have had their type change, and it's unlikely to happen again until more types are introduced in a future generation.
Source: Bulbapedia