How would I secure a pex shut off valve to the stud in the wall interior?
Generally you would just secure the PEX with some pipe clams near the valve and that would be good enough. The valve just hangs there in mine and I usually grab a pipe with one hand when I turn it.