The first year of piano I was learning on my own like many people. I would listen to pieces other students would play and find interesting pieces online to play.
Many people including myself have a teacher and many would play only the assigned pieces. It's understandable when we're not playing at a high level and need to rely on a teacher to improve our techniques. Years ago I learned violin in school and went through ups & downs. Although some of the assigned pieces can be interesting, relying on the teacher having 1 lesson a week for an hour is not an effective way of learning. Although I lerned to read at an intermediate level, my progress was going nowhere. Then I decided go to the library and find interesting pieces at my level. It's taking my playing to a new direction discovering many pieces I can read through already. The more pieces I play, the more pieces I want to play.
There are people in the family who took music lessons in the past. After their last lesson they stopped playing altogether and never touch an instrument again. Playing piano for them had become a routine of going to the teacher, practice at home and work on the assigned pieces in front of him/her, onto the next assigned pieces. Today I'm always finding & downloading interesting pieces to play so the motivation is to learn songs for myself (as an amateur musician), not for my teacher (as a student).
Last Christmas I showed up at a party playing an easy version of "Have Yourself a Merry Little Christmas". Seeing happy, smiling faces made learning & playing the piece enjoyable. A few years ago I was travelling during COVID. I was surprise to find a piano by the hotel lobby I was staying. Everybody who sat down to play would wipe the keys with tissues and rub their hands with hand sanitizer to avoid catching something. Played movements out of a Handel suite in Dm with somebody watching. Instead of playing only for the teacher during weekly lessons, I enjoy playing on a public piano.
Learning music is very much like learnng a foreign language. There are people who would go the class every week and only rely on learning from phrase books. And then there are people who would watch TV programs regularly, read foreign newspapers & magazines outside class. The more exposure to the language the faster the progress. The ones who rely on going to class regularly turned learning into a routine. After a while they don't make much progress, lose interest and quit.
Many years ago I was invited to a birthday gathering. There were 3 kids from the same family sitting in front of a digital piano with a 1-page sheet music. It's a piece their teacher assigned as appropriate for their level. For an hour they took turns trying the piece but none of them was able to reproduce something that sounded like the song. Assuming they're at the same level, Person A looked totally lost as B & C instead of each contributing to figuring out the song. Recently I connected with a playing partner online. We'd take turns exchanging sheet music. After a week we'd make a recording to share and comment on each other's playing.