Express execution order

I have the code below and it works, i.e. I first get the index.html page and then I successfully load the stylesheet with the app.use.

My understanding was that the incoming request is matched with all methods and a response is sent when there is a successful match.

In that case the response must be sent when the app.get() gets executed. How then, after sending the response, is the app getting to the app.use() and applying the styles to the index.html (that should have already been sent as a response).

app.get('/', (req, res) => {
  res.sendFile(__dirname + '/views/index.html');

app.use(express.static(__dirname + '/public'))

When someone types the base address, what corresponds to the /, which is basically the IP of the computer, then that’s a get made by the browser, and you serve the index.html file from __dirname/views/index.html

Next, there is another request, and this can be checked out by looking at the browser developer tools, network tab. This request is a get too, but it is comming from the html file. This request is made to:

When it is intercepted, the path is modified (there is no real style sheet on that route)
The middlewares intercept those requests.