You learned how to use cout for output and endl for line breaks. These are the foundation of displaying information in C++. Every program you write will probably use cout somewhere to show results or messages.
I showed you nested loops, where one loop sits inside another.
The outer loop picks the line, the inner loop prints stars for that line. The trick is recognizing patterns in problems. When I noticed that line number matched star count, I could use one variable for both.
Looking for these connections makes your code simpler and easier to understand.