You can use the following command to check if IPv6 is enabled or not.
sysctl net.ipv6.conf.all.disable_ipv6
If the output is 1, IPv6 is disabled. You can enable it temporarily by running:
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=0