The first line in a script is called as shebang or interpreter.
#! : It instructs the operating system's kernel that the file is a script and directs it to execute the file specified by the path. In other words, it directs the execution to the actual shell environment where the script must run, as specified by the path.
/bin/bash : This indicates that the script should be interpreted and executed using the Bash shell.
Similarly, one can also execute the script using another shell such as : #!/bin/zsh