I found official documentation from Apple with a sample project on how to do this. See the link below:
https://developer.apple.com/documentation/storekit/requesting-app-store-reviews
Code snippet from the project:
private func requestReviewManually() {
// Replace the placeholder value below with the App Store ID for your app.
// You can find the App Store ID in your app's product URL.
let url = "https://apps.apple.com/app/id<#Your App Store ID#>?action=write-review"
guard let writeReviewURL = URL(string: url) else {
fatalError("Expected a valid URL")
}
openURL(writeReviewURL)
}