Yes, Robert Pattinson is widely known for frequently touching, tousling, and playing with his hair, both on and off screen. This mannerism has become something of a signature.
It was even parodied in Deadpool 2 (2018), where Deadpool (Ryan Reynolds) jokes, "I've seen him play with his hair more times than I've seen him act." The habit likely stems from nervous energy and has been noted in interviews and red-carpet appearances throughout his career.