First set your contact messages to come from a certain email address -so for me it’s firstname.lastname@example.org though make it so that when you reply, you reply to the email given in the contact form. I use Gravityforms and this option is in Notifications.
In Gmail open the email that went into junk and then click the 3 dots on top right.
Then Filter Messages like these
Just have the from email – don’t fill in anything else then “Create filter” and then click “Always Mark it as Important”
then Categorise as and choose “Primary”. Then “Create Filter”. That should do it. Do a test to check.
Eg below for a client