The stars on your league card basically indicate how much of the in-game story you have completed. Your card can have a minimum of 0 stars or a maximum of 7, if you have purchased the Isle of Armor and Crown Tundra DLCs. If not, then the maximum number of stars possible is 5.
Five stars are obtained through the main game, one by finishing the Isle of Armor, and one by beating the Galarian Star Tournament [part of the Crown Tundra DLC]
I have beaten the main game and both DLCs, and my league card has 7 stars.
Sources: Experience and Bulbapedia
Hope this answered your question!