Personally, I've replaced lenses on my Pixel 2 and a couple of iPhones and never had a problem with aftermarket glass.
There is something to be said for removing the back cover to do the replacement. For me, the main advantage is that you can do a better job of cleaning out any broken glass particles from the camera lens(es) with the cover off, plus you can push the old lens out from the inside and avoid scratching your housing while prying out the broken glass.
There's a decent video demonstrating the whole process over at iphonewired.com: Samsung Galaxy S21 Ultra Camera Glass Restoration - iPhone Wired, but all in all it's a fairly easy process whether you decide to remove the back or not. If the glass just has like a single crack I'd go for not removing the back, but if it's shattered with glass shards you might want to consider taking it off.
Best of luck!