First thing first, your first line is wrong.
You wrote app = Flask(main) instead of app= Flask(name_).
Also I would Add at least a Hello world. So try with this and see if it works:
from flask import Flask
app = Flask(__name__)
if __name__ == "__main__":
app.run()
Is not really clear How you got this error. However because you are using Pycharm it may be because you have not configured the Pycharm's interpreter correctly?
Does this video solve your issue and can you confirm you have and interpreter? ---->
No python interpreter configured for the project pycharm
If this didn't solve your issue, then are you sure you are running the file correctly?
Alt+Shift+F10 and then select the script you want to run.
After that Shift+F10 will run the last script that has been run.
If also this didn't help then specify better your issue, add screenshot if needed. Also because if once you adjust the code still give you issue, is a Pycharm Configuration issue a not with the code itself