The first parameter to url_for is the endpoint name and 'static' is a special endpoint name to refer to the Static Files of your application:
Just create a folder called static in your package or next to your module and it will be available at /static on the application.
To generate URLs for static files, use the special 'static' endpoint name:
url_for('static', filename='style.css')
The file has to be stored on the filesystem as static/style.css.
So, given this:
<link ... href="{{ url_for('static', filename='styles.css') }}">
And assuming you create your Flask instance like this:
app = Flask(__name__)
Make sure your app file/folder structure is like this:
. ├── app.py ├── static │ └── styles.css └── templates └── app.html
If you are organizing your JS and CSS files like this:
. ├── app.py ├── static │ ├── css │ │ └── styles.css │ └── js │ └── app.js └── templates └── app.html
Then you have to appropriately change the arguments to url_for like this:
<link ... href="{{ url_for('static', filename='css/styles.css') }}">
If you named the static folder to something else (ex. "assets"), then you have to specify that new name to the static_folder parameter when creating the Flask instance.
app = Flask(__name__, static_folder="assets")
You can also check the Flask debugger logs that the static files are accessed correctly:
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit) 127.0.0.1 - - [29/Dec/2019 20:30:44] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [29/Dec/2019 20:30:44] "GET /static/css/styles.css HTTP/1.1" 200 -
Or your browser's debugger/inspection tools that it is indeed downloading the files correctly:

app = Flask(__name__, static_folder='static')?static_folderparameter.