Remove the headphones. Right click the sound icon bottom right and select playback devices. With the playback properties window still open plug in your earphones and a new item should show up. It might show up as Speakers with grey information underneath. Click on it and make default. Should now disable your speakers.
HTC U12 Plus review: Hands-on