Saving a remote image (from url) to users camera roll

How is the easiest way to download a picture (or video) from an url to users camera roll with a button? using SwiftUI?

I am new to the developer scene but I know how it is done when image is an asset in an app using UIImageWriteToSavePhotosAlbum and that works fine but can´t figure out how it is done when picture is remote (url). I am thinking it is something about getting the picture on a temperary asset and then to users phone.