Unless you are on the PokerStars.NET client (whic does not offer the option to save hands) then things should work when everything is setup correctly. Is PokerStars saving your hands (PokerStars Client -> Settings -> Playing History -> Hand History) and do those hand history files actually exist on your computer? If it's set to save the hands then is PokerStars actually creating the hand history files on your computer while you are playing? Go to the folder set in PokerStars and there should be a folder with your player name and inside that folder would be the hand history files. I've seen on occasion hand histories not save to the default location (C:\Users\{Windows Login}\AppData\Local\{PokerStars Skin Name}\HandHistory) so if that's the case try creating and setting a custom hand history folder (e.g. C:\StarsHH) instead in both PokerStars and PokerTracker 4 (Configure -> Sites & Import Options -> Site Configuration -> PokerStars).
Once that is setup you can test this on a table by clicking 'Play Poker -> Get Hands While Playing' and playing a few hands. If you need further assistance report this to us in a
Support Ticket with your log file and
screenshots of the following windows:
1. "Settings -> Playing History -> Hand History" in PokerStars.
2. "Configure -> Sites & Import Options -> Site Configuration -> PokerStars" in PokerTracker 4.
Guide: How to Create & Submit a PokerTracker4.log File