Text this: How lattice dynamics moderate the electronic properties of metal-halide perovskites