sh myscript.sh
It spawns a subshell where the script runs. You can continue to execute commands in the bash shell from which you began.
set name=value
Or define them in the .bashrc file which specifies variables for the bash shell. Local variables are variables that are present within the current instance of the shell. They are not available to programs started by the shell. They are set at the command prompt.