This question is related to How to hide keyboard when using SwiftUI?
Sample Code:
struct ContentView: View {