Notebook files get created when you save a project. They usually have a name like "New Notebook" with a number after them.
From a command shell, you should be able to run conda to activate an environment then use the jupyter command, like this (On my installation, conda is in "C:\Program Files\ArcGIS\Pro\bin\Python\Scripts\")
conda activate arcgispro-py3
jupyter nbconvert "New Notebook.ipynb" --to script
This wrote a file called "New Notebook.ipynb" with the contents of each cell from the notebook. In my simple case, it's this
print("Hello")