Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Having a conversation with the toxic coworker is doubly important, because going straight to HR to report them signals to them that going to HR to resolve petty insecurities is acceptable. If they want to be professional, they should learn how to interact with coworkers and resolve conflict (perceived or otherwise) in an adult way.