Save animation without opening paraview

I have a sate file taht works or paraview 5.6/5.7, since I upgraded Ubuntu to 22.04 and was trying to get python and paraview to work I reinstalled paraview. Now I am using paraview 5.10, but my psvm, pvd files don’t work.

I want to know if there is a way to save the animation directly it python?

Actually, I just installed an old tar.gz version.