Sahih al-Bukhari 6109 Narrated `Aisha:
The Prophet (ﷺ) entered upon me while there was a curtain having pictures (of animals) in the house. His face got red with anger, and then he got hold of the curtain and tore it into pieces. The Prophet (ﷺ) said, "Such people as paint these pictures will receive the severest punishment on the Day of Resurrection ."
According to the hadith that was cited, it is forbidden to draw animals and will result in punishment on the Day of Resurrection.
‘Abdullaah Ibn ‘Abbaas and said: "O Ibn 'Abbaas! I am a human being and my sustenance comes from my manual profession and I make these pictures (or statues)." Ibn 'Abbaas said: “I will tell you only what I heard from the Prophet . I heard him saying: “Whoever makes a picture will be punished by Allah till he puts a soul in it, and he will never be able to put a soul in it.” Then Ibn 'Abbaas said to him: "You can draw the picture of a tree or anything that has no soul.” Nonetheless, some scholars permitted the drawing of living beings provided that one leaves out a vital part of that creature without which life is not possible, like if it has no head, as Ibn ‘Abbaas narrated that the Prophet said: ''The picture is the head. If the head is left out there is no picture."
[Al-Isma’eeli and Al-Albaani
Mountains, trees, and any other object may be drawn; however, drawing any living thing is prohibited. If drawing a human is necessary, you can do so without any organs that will make the person lifeless.
As long as you ensure that you are complying with the rules, drawing cartoons is permissible.