I want to use the recordId from the URL in my list detail, what's wrong with the code

I found this code on the forum and would like to use it, but it doesn’t work for me and I don’t know why. A screenshot of my inserted code can be found under the answers in the post.