Remove Module
Disconnect the power cable and air assist tubes from the module & carefully remove it from the frame.
Remove Air Assist Cone
You will need to remove the air cone from the laser. On the 20w xTool laser, you will need a 2mm allen key.
Now you can see the lens protector window. Unscrew it Anti-Clockwise to remove it.
Lens Removed
Once you have it in your hand, you can now remove the glass. This operation differs for everyone. As some machines are shipped like the image and some are shipped with a brass retention part. You will need to remove the glass to go any further.
I find best to use heat. A cheap heatgun is used to melt any glue. You can try soaking it in acetone for an hour too.
I have an old video which may also help:
Reinstall
Install the new glass into the brass housing. Then insert the O-Ring (or glue it in, or use the brass retention ring pictured, if you have that)