I have found a bird that is trapping fly on my window

I’m not a bird watcher and I don’t have much of an internet in birds but in the last week I have see the same bird hitting the same window hundreds of times a day. Today I got a closer look when it did this and I have noticed that sometimes after hitting the window a few times it has a fly in it’s mouth. So I assume it has learnt to trap the flies and catch them. I am writing this because I want to know if this is a normal thing or if it is something that is new for birds to be doing?