SwiftUI: How to take screenshot of ScrollView Content?

In this tutorial, We will be converting ScrollView’s content into a UIImage.
First, we will convert any view into the UIImage then we will extend the same logic to screenshot the entire Scroll view content.