Abu Musa reported Allah's Messenger (ﷺ) as saying
The similitude of mine and of that with which Allah sent me is that of a person who came to us and said: O people, I have seen an army with my eyes and I am a plain warner (and issue you warning) that you should immediately manage to find an escape. A group of people from amongst them paying heed (to his warning) fled to a place of protection and a group amongst them belied him and the morning overtook them in their houses and the army attacked them and killed them and they were routed. And that is the similitude of the one who obeyed me, followed with which I had been sent and the similitude of the other is of one who disobeyed and belied me and the Truth with which I have been sent.
Abu Huraira reported Allah's Messenger (ﷺ) as saying
The similitude of mine and that of my Umma is that of a person who lit fire and there began to fall into it insects and moths. And I am there to hold you back, but you plunge into it.
The above hadith was likewise narrated with another chain of transmitters.
Hammam b. Munabbih reported
Abu Huraira reported us some ahadith from Allah's Messenger (ﷺ) amongst many, (and) one is this that Allah's Messenger (ﷺ) said: A person lit fire and when the atmosphere was aglow, moths and insects began to fall into the fire, but I am there to hold them back, but they are plunging into it despite my efforts, and he further added: That is your example and mine. I am there to hold you back from fire and to save you from it, but you are plunging into it despite my efforts.
Jabir b. Abdullah reported Allah's Messenger (ﷺ) as saying. My example and your example is that of a person who lit the fire and insects and moths began to fall in it and he would be making efforts to take them out, and I am going to hold you back from fire, but you are slipping from my hand.