I've seen on occasion hand histories not save to the default location (C:\Users\\HandHistory) so if that's the case try creating and setting a custom hand history folder (e.g. 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. PokerStars Client -> Settings -> Playing History -> Hand History -> Save My Hand History Is your PokerStars client set to save your hand history files? You can check that in: PokerTracker 4 only supports English so hand histories need to be saved in English (PokerStars Client -> Settings -> Playing History -> Hand History) and the PokerStars client needs to be running in English (PokerStars Client -> Settings -> Global -> Language -> English).
PokerStars has a unique policy of allowing tracking software to import 30 observed hands per session to aid with table selection which PokerTracker 4 complies with but for your own hands to import while playing everything must be setup correctly: The 30 hands you are seeing are those imported by the PokerTracker 4 'Memory Grabber' which is a special feature that integrates with the PokerStars application to grab hands that reside in memory. That means there is an issue with the configuration.