Map escape to insert escape in vterm

What happened?

New to elisp, tried to make the escape key insert escape in vterm instead of closing it. Didn’t find the answer online, didn’t understand how to do more complicated mappings work.