Why does it take so long when I click on the filename in the window title? When I click on the filename of e.g. TextEdit, to change the file name and select where it is saved, it always take 1-2 seconds until the selector thingy pops up.

That has always been like that for me. It's a bit annoying. I don't think it's a bug on my system. Maybe I'm wrong.

Why is that interaction slow or how would I profile things to measure or benchmark this?

Here's a video of the issue: https://www.youtube.com/watch?v=O_jqkMe9Ljw
By comparison, I don't experience anything like that delay on my 15" 2014 MacBook Pro. It's not instant, but certainly less than half a second.

Your video shows some circle appearing when you click. Is that from the screen recording software, or is it something else? Perhaps it's relevant.

Are you experiencing any lag in any other aspect of the computer? I'd be tempted to check that I had a good amount of disk space, and that the storage was performing well.

Check Activity Monitor, and see what's using CPU and memory at the time that you click.

Another thing to do is to test the behaviour in a brand new user account. If the problems persists, then it's at the system level. If it is absent, then you know that the cause is something in your original user account. This could be corrupt preference files or caches, or some third-party software running in the background that is causing problems. You'll need to go back to the original account and start troubleshooting.