Exciton Coupling with Cavity Vibrational Phonons and MoS$_2$ Lattice Phonons in Hybrid Nanobeam Cavities