Thanks for updating your code. It gets far more readable and would save readers time.
(When you see extra empty lines than your original code, Edit > Paste and Match Style of Safari would work.)
In your code, you put too many lines in an action closure, you should better create a method and just call it inside an action closure.
struct ContentView: View {
		
		@State var username: String = "."
		@State var password: String = "."
		
		var body: some View {
				ZStack {
						VStack {
								.onAppear { //-> Cannot infer contextual base in reference to member 'onAppear'
										doHttpRequest()
								}
								//...
						}
				}
		}
		
		func doHttpRequest() {
				if 1==1 { //Do you still need this?
						let myUrl = URL(string: "...")! //Trailing semicolon is not needed
						var request = URLRequest(url: myUrl)
						request.httpMethod = "POST"// Compose a query string
						let postString = "Name=\($username)&Passwort=\($password)" //???
						
						request.httpBody = postString.data(using: .utf8)
						
						let task = URLSession.shared.dataTask(with: request) {
								(data, response, error) in
								
								//Use if-let when you want to use the unwrapped value
								if let error = error {
										print("error=\(error)")
										return
								}
								
								//Use guard-let when nil has no meaning and want to exit on nil
								guard let response = response else {
										print("Unexpected nil response")
										return
								}
								// You can print out response object
								print("response = \(response)")
								
								//Let's convert response sent from a server side script to a NSDictionary object:
								do {
										//Use guard-let when nil has no meaning and want to exit on nil
										guard let data = data else {
												print("Unexpected nil data")
												return
										}
										//#1 `mutableContainer` has no meaning in Swift
										//#2 Use Swift Dictionary type instead of `NSDictionary`
										let json = try JSONSerialization.jsonObject(with: data) as? [String: Any]
										
										if let parseJSON = json {
												// Now we can access value of First Name by its key
												//Use if-let when you want to use the unwrapped value
												if let firstNameValue = parseJSON["Name"] as? String {
														print("firstNameValue: \(firstNameValue)")
														let dateien =	firstNameValue.components(separatedBy: ",")
														print(dateien)
												}
										}
								} catch {
										print(error)
								}
						}
						task.resume()
				}
		}
}
(I have brushed up some parts of doHttpRequest. Please see comments with //#.)
You should better include the error messages when you want to ask something about codes causing errors.
The error Cannot infer contextual base in reference to member 'onAppear' occurs becauseonAppear is a method classified as view modifier, which must be added to a view.
In your code, there is no view directly before .onAppear.
For example, if you put .onAppear to the outermost view of body, you can write it as:
		var body: some View {
				ZStack {
						VStack {
								//...
						}
				}
				.onAppear { //This `onAppear` is added to `ZStack{...}`
						doHttpRequest()
				}
		}