Most probably the original switch will have to be unsoldered from the circuit board and the new switch soldered in its’ place.
It may be a smd type component (it’s a bit hard to tell from the image (see below). If it is then you’ll need smd soldering skills and tools to do the repair.
The hard part might be sourcing the correct replacement switch. It may even be a Bose proprietary switch i.e. made especially for or even by Bose, which will make it harder to get unless you can find a part number for it
Here’s a blown up image of the power switch taken from the ifixit Bose QuietComfort 35 PARTIAL Teardown guide, that shows the switch.