Create a starship.toml file under your home dir (if it does not exist)
Run the following command in your terminal:
starship config command_timeout 1000
or simply open starship.toml in an code editor and add the following line (top of the file)
command_timeout = 1000