How to stop iteration of trigger when update document?

I inserted trigger date using atlas trigger when document insert or update operations. But trigger date field updated every time. Because that trigger method running infinite. How I avoiding it?

I am not sure I follow your question. My interpretation is that you have a trigger on a collection where you then update that same collection which then causes the trigger to fire again.

One way to avoid this is to tag the “trigger’s update” with some information that you can use the MatchExpression to filter it out. IE, you can add a fromTriggerCount field to the document and have the trigger function do a $inc on that field. Then your match expression for the trigger can include something like:

{ updateDescription.updatedFields.fromTriggerCount`: {$exists: false}}