Hi @lanier ,
Does the phone stay on when the charger is connected and switched on?
If so it may be that the battery is failing under load and it needs to be replaced.
Here’s the ifixit [guide|98500] guide which shows how to do this.
ifixit also sells the [product|IF368-005] but be aware there are [https://help.ifixit.com/article/195-battery-shipping-warnings|battery shipping restrictions] in place. The link was just to show you the cost of the part. There are other suppliers online that may suit you better. Just search for ''Moto Z Play battery'' to get results for suppliers