Some people are of the opinion that practicing the piano involves playing through their pieces of music. Playing through piecees of music can certainly be a part of piano practice, but it is hardly the complete story.
Before delving too far into this topic, I would like to stipulate that this is my professional opinion, based on teaching for a few decades. While I know that my opinion is valid and a lot of other music teachers would agree with me, there will be ones that disagree and that’s fine. Especially if you have a piano teacher that you are working with, that tells you something different from what I say, I suggest you follow their professional advice.
Practicing the piano is more about working on sections or elements rather than just playing through the whole piece. Playing through the whole piece is a part of practicing because you get to a stage where you need to be able to put all the sections and components together and play it as a whole. Also it is useful to play through a piece that you have previously learned to make sure that you have not forgotten it at all.
Many years ago, it was recommended (or maybe enforced) that piano students need to start their practice with scales. I don’t think that this is necessary as really anything can be used as a warm up to begin your piano practice, although scales are a solid choice. The point is that you do need to have some sort of warm up at the beginning of a piano practice.
When it comes to practicing a new piece of music, I think it is most important to concentrate on getting the notes, the timing and the fingering correct from the outset. I know that this can be a lot, but if these elements are not correct, then fixing them later on will be so much harder. Things like speed and dynamics (so the loud and soft bits) can easily be added in later.
If you are finding a new piece of music difficult, then two things will help. The first helpful thing you can do to make a piece easier to learn is to practice slowly. If this doesn’t help, then slow it down some more. It does not matter how slow you go because as soon as it is learned at a snail’s slow pace, you will naturally start playing it quicker and quicker with every practice. Before you know it, you will be playing it at a reasonable speed.
The second thing that you can do to help you learn something quicker, is to break things down into learning a line at a time or even a bar at a time. This will help you get to know sections quickly and then you can put everything together at a later stage.
There are other tips and tricks to help you learn a piece of music, but most of what I could suggest would be dependent on the piece of music you are working on. It is also important to note that some tips might only be useful for some and not others. Whatever you do, if you use this information and apply it enough times, it will definitely help you to learn to play your pieces of music in a reasonable timeframe.