Control PWM for Mac Boost Solenoid

Since OP states -

Here's some additional reading to help you be able to answer that question -

https://www.baldengineer.com/low-side-vs-high-side-transistor-switch.html