Leveraging SN Ia spectroscopic similarity to improve the measurement of $H_0$