If year is of class Date, then I think the code would be scale_x_date(date_breaks = "1 year"). Let me know if that works. If you can provide some sample data I can test other options if scale_x_date doesn't get the job done.
is this method can be applied for the y axis as well,then what would be the function in that case like you used earlier for that specific scenario
scale_x_date.....
To show just the year: scale_x_date(date_breaks="1 year", date_labels="%Y")
For the y-axis, which in this case is a continuous value, you could do, for example: scale_y_continuous(breaks=seq(20000, 200000, 10000), labels=scales::comma) + expand_limits(y=0).
See the help for scale_x_date and scale_y_continuous for additional options.