Open cmd in your script's folder (as before: in File Explorer, click the address bar, type "cmd", and press Enter).
Instead of typing just scriptname.py, type this exactly (replace scriptname.py with your actual file name):
python scriptname.py
Press Enter. The script should now run directly in the current cmd window, without popping up a new one that disappears