Measurement of the $CP$ asymmetry in $D^0\toπ^+π^-π^0$ decays at Belle II