Guns are absent in the Avatar anime despite it being a canon because of two reasons. The first reason is that it is a show for a younger audience (mainly kids). So the any depiction of firearms is a strict no-no. Secondly, Bending is far more efficient. Technology in this anime is not as advanced as the modern day.
With the introduction of the Idealist in Avatar Legends: The Roleplaying Game, guns are canon. However, given the reasons above, they are not used in the anime.
Why guns are not used in the Avatar anime?
The biggest reason for guns not being used in the Avatar anime is because it is a kids television show. Any depiction or hints at firearms is banned and is not permitted to be shown to a younger audience.
Another reason is that Bending is a far superior method of attack and defense. Bending elements such as Fire, Water, Earth, and Air work much better than relying on a firearm. It takes the cake in terms of versatality in combat and even daily life.
Bending in Avatar works as a defense as well as an offense. Earth Benders can create a solid wall against oncoming attacks, so can the Benders of other elements (like a wall of water or fire). In terms of offense, the show depicts it being used in creative ways to overpower the opponent and gain an advantage.
In fact, Bending will be far more important as it can deliver some serious AoE (Area of Effect) Damage. This will help break stalemates or bail out users who have been outnumbered by opponents.
Guns might be a double-edged sword
Using guns in Avatar might turn out to be a double-edged sword. Firstly, according to the timeline of the anime, mass production of firearms would be a hassle. Producers will have a tough time going through the process with a trial and error method to produce a useful and useable firearm.
Secondly, guns have no defensive abilities. Despite their powerful offensive capabilities, they offer no form of defense to the user. So, bringing a gun to a fight against a Bender could be sketchy.
However, a gun can deliver a fatal blow quicker than a Bender can. Not only that, guns have quite a long range so picking a fight from a distance does not seem like a bad idea. A firearm with enough firepower can incapacitate a number of enemies with a fewer shots and much less effort.
Additionally, firearms would help out non-benders a lot. They would be able to defend themselves. Colonization of areas controlled by spirits or “dangerous” areas could open up to human settlement. The military’s efficiency would greatly improve a mix of Benders and armed non-benders.
There is truth in the fact that guns are canon given their introduction in the Legends Roleplaying Game. The technology is also fairly advanced in the anime, evident by the existence of ships, zeppelins, etc. Nonetheless, guns are not used and probably might not be either.
The production studio and other parties involved are aware that the depiction of the use of firearms in banned. The show is for kids and does not allow any such kind of showing. They would anyway never allow it.