Also, Windows Phone was an amazing OS in its own right but failed largely because they couldn’t solve apps. It is impossibly hard to compete against Apple or Samsung in this space, especially when the OEMs didn’t want to play ball.
(Samsung, HTC and LG made a few Windows phones that they didn’t invest a lot of time on. They were most likely an expensive relationship maintenance activity to retain a partnership with MS. I believe this happened because MS imposed really strict guidelines for their OS experience right out the gate that didn’t really benefit anyone but Microsoft (OEMs make money on preinstalled apps, for example; that wasn’t allowed.) It was much easier for them to just pump more money on making great Android devices than trying to make Windows Phone great again)