You can use the screen replacement guide to walk you though the steps.
A few cautions. If your phone is under warranty then this will most defiantly void the warranty. I would look into what options you have to get the battery replaced under warranty. How long have you had the device?
When taking the back off, it’s really easy to break the back glass. Use a lot of heat and take your time. A thin pick will help and be careful around the edges. Make sure the back stays hot. This will help keep the adhesive loose.
Keep track of your screws and make sure you know what goes where. Use a little heat and a pry tool to loosen the battery. Just be careful about puncturing the battery. If you can get under the battery with a pick or other pry tool you’ll be good.
Finally, you will want some kind of adhesive to put your back glass back on the phone. iFixit might have something otherwise see what you can find online.
Motorola Moto G6 Screen Replacement