Similar to the answer from Ankit, there is also an example project from Apple that demonstrates how to do this:
https://developer.apple.com/documentation/storekit/requesting-app-store-reviews
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)
}