Positional Peramaters is the concept your looking for.
There's built-in variables that represent the arguments passed to a script, $1 for the first thing passed, $2 for the second, etc. $# tells you how many.
There's a special Parameter, $0, which represents what your asking about -- the script itself. the zeroth argument.
To be pedantic, and completely thorough this is how man bash describes this parameter:
"The shell treats several parameters specially. These parameters may only be referenced; assignment to them is not allowed."
0 Expands to the name of the shell or shell script. This is set
at shell initialization. If bash is invoked with a file of com‐
mands, $0 is set to the name of that file. If bash is started
with the -c option, then $0 is set to the first argument after
the string to be executed, if one is present. Otherwise, it is
set to the filename used to invoke bash, as given by argument