In MacOS settings (tested on Sequoia) one can search for "Allow applications to use developer tools". After adding Iterm to this list of apps, I didn't notice any delays when running my executables there for the first time after compilation. Same for VS Code. Hopefully, this answer will be helpful for others. :)