Insert node title in the message sent by contact form
The current node is available from the route match, \Drupal::routeMatch()->getParameter('node'). Make sure it really is an instance of NodeInterface before you continue or check the route name.

Then it's easy to use $node->getTitle() as the default value for the subject of the contact form. Depending on what you want to do, you can then also hide the subject field.