I'm going to throw my two cent's worth in here and advocate for replacing the housing.
My main reason for suggesting replacing the entire housing rather than just the glass has to do with the potential for damage to the internal components. You have to use a significant amount of heat to get the rear glass off, and there's always the potential for whatever tool you're using to dig out the glass to slip and damage parts that are normally protected by the glass.
You can mitigate that danger by removing the internal components before starting your glass replacement, but then you're at the same place you would be with replacing the entire housing.
You have lots of options; for a new part you can get it bare or with "small parts", generally meaning some of the internal cabling already installed, along with buttons and retainers.
Used ones are readily available as well, and the same options apply. The upside of buying a used part is that any parts included are likely to be genuine Apple original parts, but of course you take your chances; I bought one for an iPhone X that looked like it came with most of the internals, but it turned out that they had done a lousy job of removing parts so what remained wasn't usable. Naturally you'll want to see lots of pictures to verify the condition of the housing, depending on how picky you are regarding appearance.
This was the choice I made when my daughter-in-law's iPhone X was in the same condition as yours, and as bonus I used the experience to write the iPhone X guide for replacing the rear housing, along with several other guides for other parts that I needed to remove as part of the work.