Hi Saesha,
As it turns out iFixit already has the official Motorola service manual for your phone that shows you exactly how to replace the screen. Your phone is like many Android phones in that the recommended method for replacing the screen is to buy it already attached to the midframe, then transfer all of the internal components to the new screen+midframe assembly. Essentially you have to gut the phone and rebuild it in a new housing. That's the procedure shown in the Motorola manual, and the same as the one posted by @vincent81304.
Moto G 5G XT2417 Level 2 Repair Manual - iFixit
As far as parts, I personally have three main sources I use. If I want the very cheapest prices and am willing to wait longer for shipping from China, I use AliExpress. Although many people decry the quality of these parts, I have used them successfully for years now.
If I don't mind paying a little more but want shorter shipping times, I hit up eBay. And finally, Amazon tends to be a bit more expensive but with a Prime account you can frequently get the parts in a very short time, sometimes overnight.
Any of these sources will undoubtedly be cheaper than the factory Motorola parts, and as I mentioned, I've had good luck with these aftermarket suppliers on any number of different kinds of phones.
Best way to search is to use the model number of your phone to verify the parts are the right ones for your specific phone.
Good luck, and let us know how it all turns out for you!