@webdev91 There are 2 options available i.e. on-demand and the scheduled.
As information provided by @B_Sravan you can utilize the core components to implement the same. But if you can certain requirement for modifying the content while generating the sitemap, proceed with the scheduler approach.
@C...