Text this: Interlayer engineering of lattice dynamics and elastic constants of 2D layered nanomaterials under pressure