Open the cockpit window:- only when advised by the manufacturer’s SOP.
In some aircraft types, the air flow suction around the cockpit window draws smoke into the cockpit from the galley/cabin, possibly making the situation worse.
Expect noise and a lot of dust, and possibly distraction from flying paperwork etc.