Ok so I’m not going to comment on all the “expert” advice!
You never use pipe dope on plastic threads TAPE ONLY! Dope will weaken the plastic over time and provide you with a happy flood!
I have a couple pieces of advice on what I can see in your photo (not criticizing your install just trying to help!). Your gas valve and union need to be swapped, gas valve comes first so you can shut off gas then crack union to service the unit.
Please run relief discharge to 6” above the floor and do not use that PVC, it must be cpvc or copper!! Pvc is only rated for 73 degrees if that relief valve blows the pvc will melt and potentially hurt someone