Everything looks fine here now. Except that you didn’t need more {} at OnCollisionEnter2D, but it will still work.
What is the error message you are seeing? And can you post the full class. Don’t paste a screenshot, copy the code. You can see how to format code in this post: How to apply code formatting within your post