How open file browser to save a new blender file
There is no need to use code to save stuff. It's quite simple, actually. Blender's file browser isn't like the one built-into your computer. You have to go through your drive's file system from the root to locate the destination folder that you would like to save your project to. First, select your main drive. While there, you will see a "users" folder. Double click on it, and then select the folder with the account name that you are using. Then you will find a long list of many folders. You'll also see folders such as documents, music, videos, and any other library. Click on the library that you wish to store your project in, and then select your folder, and name your file, then click "Save As" (or press enter) to save.

Hope that helps!