Why is the digitalWrite output low in voltage?

The battery ground (negative) goes to the MOSFET source, but must also go the the Arduino ground.
The MOSFET is not a logic level device so will not turn on fully (if at all) with 5V. To choose a proper MOSFET we need to know the required coil current and voltage.