Help: open a file png saved by RStudio

I've created a simple code:

a<-read_excel(file.choose())
a

A tibble: 7 × 8

  Y debito salario affitto consumi risparmi  mutuo     T


1 0 340 0 0 0 0 300 0
2 25 -15 60 -24 -15 0 0 6
3 26 -15 65 0 -15 6.6 -15.1 26.5
4 27 -15 70 0 -18 35.7 -15.1 57.6
5 28 -15 75 0 -2 104. -15.1 146.
6 29 -15 80 0 -18 288. -15.1 319.
7 30 -265 400 0 -115 366. -252 134.

hist(a$Y)
b<-hist(a$Y)
png("b.png", width=700)

When I search to open it by Phono app of Microsoft the system answers to me that the photo is not the format is not supported (but it opens the others files in png) or file is damaged.
What could I do to solve this problems?

Welcome to the forum.
I think we need a FAQ: How to do a minimal reproducible example ( reprex ) for beginners