Please make sure that PokerStars is still saving hands as this can get turned off on occasion when the PokerStars client updates itself:
PokerStars Client -> Settings -> Playing History -> Hand History -> [x] Save My Hand History
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' in PokerTracker 4.
If you need further assistance report this to us in a
Support Ticket with your support bundle 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 PokerTracker 4 Support Bundle