You can achieve that using Array + Local Storage.
Suppose you have 10 levels. Create an array (1D) of size 10. The index of each element will be the index of the level, and the element at that index will be the number of stars assigned to the player for that specific level.
Ex: [2,3,3,-1,-1,-1]. Level 0 was completed with 2 stars, level 1 with 3 stars, level 2 with 3 stars, and level 3,4,5 are not completed.
In Construct you can't explicitly store arrays using data storage, but you can store text. By converting the array into a JSON and then storing the JSON, you can effectively store an array, represented as a string.
When you get your data back, you just need to load the JSON into the array.
Here's a working example: dropbox.com/scl/fi/sxcybgz2948554akfm3gv/Level-Stars.c3p