Using digital outputs to switch 24v DC

Thank you for the suggestion