Hi you can save plots using ggsave()
Code to save ggplot in your system.
ggsave("image_name.png",plot_object, [width], [Hieght])
Height and width are optional and can be provided to give image properties.
Plot object is the R variable that holds the plot such as line below.
line = ggplot(mpg, aes(displ)) + geom_point()
The other way is to use png() function as explained here.
https://www.edureka.co/community/1349/save-a-plot-as-image-on-the-disk-using-r?show=1349#q1349