Properly thanking people is how you build social capital. Social capital is how you advance your career, build influence, and get promoted.
Noob way of saying thank you: "Thanks for the pointer" โ
Better way of saying thank you: "That was so helpful, you unblocked a critical milestone of this project" โ
Some other tips: