@Ruthine Your boat info shows you as owning a Hunter legend 42.5 rather than a 40.5. I am assuming you have a 40.5 and all answers are based on that. First thing you need to do is identify the location off all your through hull valves. The following is based on my boat and there may be differences if the PO changed things or they did something different at the Hunter factory.
There are two under the sink cabinet in the forward compartment. The one below the waterline (lowest one) is the is the thru hull for the water intake for the forward head. The one higher is for the sink drain and it is above the water line. I keep both of these close when off the boat.
There are three valves in the bottom of the sink cabinet in the after head. The one on the left (forward) goes to the after head water intake. The middle one goes to the overboard discharge from the mascarator for pumping overboard when legal to do so. This should be kept closed and secured closed (with tie-wrap or lock) when in waters where overboard discharge is prohibited. The one on the right (farthest aft) is the sink drain. All three are below the waterline. I keep all three closed when off the boat.
In the aft cabin under the aft bunk is a large panel that lifts up at the forward edge of the bunk. The thru hull valve for the engine is there. There may be more valves there depending any modification that may have been made like an Air Conditioning Unit, Generator, etc. There is at least the engine thru hull and a sea water filter. I keep the engine thru-hull shut when not in use. I also put the engine key on a ring on the valve handle so I don't start the engine with the valve shut.
I know as a new boat owner it can seem overwhelming but this forum is a wealth of information. Ask away but really try to get to know your boat and all the workings. The 40.5 is a great production boat. It is not a Swan or an Oyster but bang for the buck is pretty high and if you take care of it, it can handle probably more than you can. Ask me how I know?