I don’t like IPv6 since all it does is cause issues, here is how to disable it for APT, you could do it system wide as well if you wanted

echo 'Acquire::ForceIPv4 "true";' | sudo tee /etc/apt/apt.conf.d/99force-ipv4