I use branches personally. The best way to sterilize them is putting them in the oven on a low temperature (like 200F) for an hour or so, but not all branches fit. In that case, if it's hot where you are you can try stuffing them in a large black trash bag and laying them out in the sun to 'cook'.
My enclosure is made of wood, so I've opted to drill holes into the wall-mounted branches and then install threaded pipes, then drill a hole through the enclosure itself. This is not possible with glass enclosures, and some folks with PVC or wood might not want to mess with all that, so you can look at how SerpaDesign on Youtube mounts branches in larger enclosures, no holes required. Just lots of silicone.
For the non-wall-mounted, I've tried to arrange them in ways that I think would support my snake, but she sometimes has other ideas lol.
I also use some shelves I bought from Universal Rocks that are mounted with silicone.
I have seen other people use PVC pipes, but I personally prefer the look of branches so haven't opted for that route.