(someone) got sidetracked

When you "get sidetracked" it means that you were trying to do one thing, but then started doing something else instead:

I was trying to cook dinner but I got a little sidetracked.

You can say that you "got sidetracked" by something more important than the original action, or by something that's not important at all.

This phrase appears in these lessons: