The racors with the clear bowls (probably similar to Yamaha equivalent) I have are a bit more difficult to change since the bowl has to be removed from the filter body too. I take the entire assembly off and out of boat, drain fuel out by turning upside down, and opening valve at bowl. Then place it on a bench. I use a strap wrench same for car oil filter on the filter, and use a length of 3/16 or 1/4 in. thick pad of neoprene to wrap all the way around the bowl to get a good grip, then hand twist it off. If it still doesnt budge, I use a second strap wrench over the neoprene. New O ring on bowl gets a wipe of Yamalube.
It may be easier to get the bowl off first in the boat depending on your access, though a lot of gas will drain off there. If the filter is near battery, don't do it this way. Keep any battery chargers or inverters shut off too.
If batter is not in box, cover top.
Keep all the bilge access doors open to clear fumes, don't let any wrenches get loose around battery, I presume you have no exposed positive DC circuits back there in the vicinity.
And this may sound crazy, don't wear any acrylic sweaters or the like, only natural fabrics. I don't wear watches / jewelry - if you do best to take them off.