Reducing decoherence in quantum computers rapidly decreases the overhead needed to construct a logical qubit from physical qubits. In solid-state systems, a class of defects known as two-level systems is a major source of decoherence. Currently, superconducting qubit experiments reduce dissipation due to the two-level systems by using large device dimensions. However, this approach only provides partial protection and results in a trade-off between qubit size and dissipation. In this work, we instead engineer the interactions between a qubit and the surrounding two-level systems using phononics. We fabricate a superconducting qubit on a phononic-bandgap metamaterial that suppresses phonon emission mediated by the two-level systems. The phonon-engineered bath of two-level systems shows increased lifetime and affects the thermalization dynamics of the qubit. Within the phononic bandgap, we observe the emergence of a non-Markovian qubit behaviour. Combined with qubit miniaturization, our approach could substantially extend the qubit relaxation times.