When should one use D2 vs graphviz?

I stumbled upon this link that should help: https://text-to-diagram.com/