Self-leveling underlayment finds every hole in the subfloor and pours itself into the room below. Seal the big gaps with expanding foam first — it mushrooms tight against the plywood — then trim the excess flush the next day with an oscillating tool.
Find the centerline of the shower curb, set a 2x4 on that line, and anchor it into the bottom plate, top plate, and adjacent stud with 3-inch construction screws — so the glass door or panel has solid wood to bite into instead of bare drywall.
The valve opening is the hole most people forget to waterproof in a shower wall. Embedding a mixing-valve seal gasket in thinset closes it off — ten dollars and five minutes against moldy walls.