Unable to build on actual iPhone device

I updated my keychain certificate. At that time I forgot to always trust and build. When I did so, I was prompted repeatedly to enter my username and password in a dialog. There were so many that I rejected them all in the process. Then I went to the keychain, changed the certificate to always trust, and built again. But I got an error and was told to change the trust setting back to default. So I did as I was told and built again. Then I was asked to enter my username and password again and again, so this time I entered them all correctly. However, it still did not work. After building Xcode, I found a Repair button in the provisioning file settings, so I pressed it and built again. After entering the dialog, I got Build Sccess, but it could not start and I got an issue dialog. How do I get it to build on a real machine?

Details Could not launch “Runner” Domain: IDEDebugSessionErrorDomain Code: 3 Failure Reason: failed to get the task for process 14356 User Info: { DVTErrorCreationDateKey = "2023-06-06 06:48:35 +0000"; DVTRadarComponentKey = 855031; IDERunOperationFailingWorker = DBGLLDBLauncher; RawUnderlyingErrorMessage = "failed to get the task for process 14356"; } -- Analytics Event: com.apple.dt.IDERunOperationWorkerFinished : { "device_model" = "iPhone10,3"; "device_osBuild" = "15.4.1 (19E258)"; "device_platform" = "com.apple.platform.iphoneos"; "launchSession_schemeCommand" = Run; "launchSession_state" = 1; "launchSession_targetArch" = arm64; "operation_duration_ms" = 22537; "operation_errorCode" = 3; "operation_errorDomain" = IDEDebugSessionErrorDomain; "operation_errorWorker" = DBGLLDBLauncher; "operation_name" = IDEiPhoneRunOperationWorkerGroup; "param_consoleMode" = 0; "param_debugger_attachToExtensions" = 0; "param_debugger_attachToXPC" = 1; "param_debugger_type" = 5; "param_destination_isProxy" = 0; "param_destination_platform" = "com.apple.platform.iphoneos"; "param_diag_MainThreadChecker_stopOnIssue" = 0; "param_diag_MallocStackLogging_enableDuringAttach" = 0; "param_diag_MallocStackLogging_enableForXPC" = 1; "param_diag_allowLocationSimulation" = 1; "param_diag_checker_tpc_enable" = 1; "param_diag_gpu_frameCapture_enable" = 0; "param_diag_gpu_shaderValidation_enable" = 0; "param_diag_gpu_validation_enable" = 0; "param_diag_memoryGraphOnResourceException" = 0; "param_diag_queueDebugging_enable" = 1; "param_diag_runtimeProfile_generate" = 0; "param_diag_sanitizer_asan_enable" = 0; "param_diag_sanitizer_tsan_enable" = 0; "param_diag_sanitizer_tsan_stopOnIssue" = 0; "param_diag_sanitizer_ubsan_stopOnIssue" = 0; "param_diag_showNonLocalizedStrings" = 0; "param_diag_viewDebugging_enabled" = 1; "param_diag_viewDebugging_insertDylibOnLaunch" = 1; "param_install_style" = 0; "param_launcher_UID" = 2; "param_launcher_allowDeviceSensorReplayData" = 0; "param_launcher_kind" = 0; "param_launcher_style" = 0; "param_launcher_substyle" = 0; "param_runnable_appExtensionHostRunMode" = 0; "param_runnable_productType" = "com.apple.product-type.application"; "param_runnable_type" = 2; "param_testing_launchedForTesting" = 0; "param_testing_suppressSimulatorApp" = 0; "param_testing_usingCLI" = 0; "sdk_canonicalName" = "iphoneos16.2"; "sdk_osVersion" = "16.2"; "sdk_variant" = iphoneos; } -- System Information macOS Version 12.6.3 (Build 21G419) Xcode 14.2 (21534) (Build 14C18) Timestamp: 2023-06-06T15:48:35+09:00