According to the situation you described, if there is only occasional abnormal stool color, I suggest you don't worry too much, which is mostly caused by dietary changes.
Suggestion:
However, if this dark green stool appears for several days in a row, accompanied by obvious abdominal pain or discomfort, there may be gastrointestinal bleeding or other conditions. I suggest you go to a regular hospital for routine stool examination and then treat according to the results.