Oh my, I feel you.
If I had a penny for every time I came up with a story idea only to find out years later that it had already been done by someone else, I'd probably be rich by now :'D heck, I still can't get over the fact that one of the bad guys in my story (which I've been writing since 2015) is pretty much the lost twin of Lord Viren from The Dragon Prince (2018): same face, same haircut, same beard, same colors, both have a name that ends in -en, heck, the two have a lot in common even as far as their attitude goes. Okay, they're not exactly the same, buuuuut... I'm still kinda shocked, lol.
So yep, as other people said... this kind of stuff happens a lot. Sadly, coming up with 100% original ideas is pretty much impossible, at this point. The good news, however, is that you're hardly going to meet someone who will accuse you of "stealing" a well-established trope. Well, unless we're talking about haters, but as others have pointed out, haters will find just about any excuse to hate on stuff, so it's not like not using a certain trope is going to do much to prevent hate. Also, as previous posters said, it's your take on the story that differentiates it from other works, so even if there are a few traits in common with other works, the way you're developing your own plot is what counts the most 