The understanding of nonequilibrium dynamics in many-body quantum systems is a fundamental issue in statistical physics. Experiments that probe universal properties of these systems can address such foundational questions. In this study, we report the measurement of universal dynamics triggered by a quench from the superfluid to normal phase across the Berezinskii-Kosterlitz-Thouless transition in a two-dimensional (2D) Bose gas. We reduced the density by splitting the 2D gas in two, realizing a quench across the critical point. The subsequent relaxation dynamics were probed with matter-wave interferometry to measure the local phase fluctuations. We show that the time evolution of both the phase correlation function and vortex density obeys universal scaling laws. This conclusion is supported by classical-field simulations and interpreted by means of real-time renormalization group theory.