From my perspective, students like to learn programming on some exciting projects, even if they didn't implement the entire application from scratch. It seems to me that developing several applications with some pre-implemented components can work well here, and students only add part of the functionality while learning the basics. Then, after gaining enough experience in the language, they can move on to more complex topics in more independent projects. In addition, you can always provide students with ideas on how they can improve such an application on their own.
I can give my specific example in two courses - 1)
https://plugins.jetbrains.com/plugin/21067-kotlin-onboarding-introduction and 2)
https://plugins.jetbrains.com/plugin/21913-kotlin-onboarding-object-oriented-programming
In the first part, students have to implement six console applications from scratch, learn the basic concepts, create interactive applications, and write all the code themselves. The second part assumes knowledge of the concepts from the first part and contains four web projects in which the client is already implemented, as well as the client-server interaction, is implemented too, and students, step by step, add the necessary functionality to make the application work. I talked with students who have completed both parts, and they really like this project-based approach. They are happy with the problems with some results in the shape of completed apps. However, since the first part involves creating projects from scratch on simple topics, projects sometimes seem boring to implement. In the second part, there is no such problem. Various ideas are also added on how to change the project at the end of the implementation of each of them - changes that affect only the server logic and which the student can make without knowledge of the client-server architecture, but also offers options for how the game can be improved if the student is familiar with the client-server architecture. But many students noted that they were interested in taking this course precisely because they did not need to study everything at once but at the same time get a working application. That is why the next part that I am currently working on in this Kotlin Onboarding course is also built on exciting web projects. At the same time, we are giving this course along with the materials that were presented at the live stream on Wednesday, but we also already had classes on the advanced part of the course, where students had to implement various applications from scratch when they already had Kotlin experience with pre implemented ones, including applications with a client-server architecture