Use 'who' with people especially, often with other living beings ('my dog, who runs away daily, always is home for dinner') or groups of them ('the NY Yankees, who won the championship that year, were my favorite'), but never with objects unless pretending they live ('my stuffed bear, who sleeps in my bed, wakes me every morning').
If you care about these things, the Chicago Manual of Style is a large, technical, highly respected guide aimed at publishing. Fowler's Modern English Usage is more focused on usage. A short and beloved guide is The Elements of Style by Strunk & White. You can find all on the Internet Archive, I'm almost certain.