Moto or Google?

I have this super phone: Moto Z. I just love it. I really do.
At the beginning of this year it started to act weird when trying to take picture: it would just shut down. Out of the blue, no matter how charged or discharged the battery was. As I said, I love my Moto so I thought to myself: I bought this phone to be a phone not a camera, so ignored the issue. A few months ago, the shut down started to happen whenever I opened a not phone app: WhatsApp, Facebook and Facebook Messenger. So I started to search the web. And because there is a lot of junk I found some articles about how Google and Facebook are in some sort of war. And I immediately thought: is my phone weird because of that? So I uninstalled all Facebook apps or what I know to belong to Facebook). But imagine my surprise when. I found that my Moto Z would shut down on twitter, camera, even when visiting some pages on chrome. Then I started to blame Motorola. Sorry Guys 🙁
I even reset my phone, wiped chace partition and nothing.

So what should I do now? Buy a pixel phone? I see that it is the only one acting as a phone should. So what did you do Google? And Lenovo, do you not care about your Moto phones? I do! Please fix it.