Scanning tunneling microscopy and spectroscopy study of layered transition metal chalcogenide thin films tuned by thickness, structural phase, and heterostructure