VTKFile and XDMFFile can save both DG and CG functions. VTXWriter can save CG functions. In the main branch, VTXWriter can also save DG functions but not together with CG functions yet.
You can find some examples here in this post:
When visualizing with Paraview, you should use Xdmf3_Reader_T for XDMF