With _ScriptEditor create a new script, select Python 3. If you just create a new one that is not based on a template you’ll see some documentation. Following that you can add requirements like numpy to your script. They get automatically installed.
This has been mentioned already several times on this forum (already dating as far back as November of 2021):