Get a proper module
The most straightforward solution would be to get a 24 V rated laser module. However, that boat already departed (unless you can send it back and get a proper one in return).
The fan could be a 5 V signal, a 12 V, or a 24 V one, so make sure your laser module uses that as a trigger.
Often, laser modules line their output directly to their power supply and have no extra switch wires - using the main heater cartridge connectors as the power supply and switch will certainly work on its own, once you get the proper voltage set.
Buck Converter
To get from 24 V to 12 V, you can use a Buck converter, in this application also known as a Step-Down-Converter. This will turn the 24 V output of the mainboard's heater wires into useable 12 V power. Often, these items have quick-connect plugs, possibly allowing you to quickly swap the laser module in, provided you have everything else set up similarly.
Please keep in mind that these modules, depending on setup, can shed quite some heat, and might require a suitable cooling setup. Heating can also indicate bad manufacture.
Voltage divider
If you can be really sure that you get 24 V Output max, you could use a beefy 1:1 voltage divider by using two same-sized resistors and taking the supply voltage between the two before going back to the ground. To alleviate heating problems (you'll shed loads of heat) you should use resistors that have cooling planned in.
Optocoupler
If you want to run the laser from an external 12V, you could run that though an appropriate optocoupler and use any output from the printer as your "signal" to allow power to flow.