Fetching details from the dictionary...

confused; flustered; at a loss
道に迷ってまごまごしたら親切な人が助けてくれた。
When I was lost and confused, a kind person helped me.
初めての場所でまごまごして困った。
I was flustered and troubled in an unfamiliar place.
まごまごしていると電車に乗り遅れるよ。
If you keep dawdling, you'll miss the train.