Carnidos (Gen 8) Not Available in Pokémon Diamond (Gen 4)
You cannot get Carnidos in Pokémon Diamond.
Carnidos is a Generation VIII Pokémon introduced in Pokémon Sword and Shield. Pokémon Diamond is a Generation IV game, so Carnidos does not exist in its code.