Memory is based on associations. Therefore, in order to remember something, you must create a strong association with something that you already remember. The strongest associations are usually visual, but you must try to attract other types of perception to make the association even stronger.
Musical memory. It means memory for the construction of music, its structuring. Usually people do not pay the slightest attention to this aspect, as it includes knowledge of the theory of music and harmony. Take care of this aspect, writing out harmonic progressions, learning to build melodies (ascending / descending gamma, jumps, etc.). You can also try to copy music (several times) until you can write it from memory. If you do not "understand" music, it will be difficult to remember, since it will be (for you) just a random sequence of notes.
Try this method. Put your book with the notes of the play you are trying to memorize on the table next to the piano (but far enough so that you can not see the content). Now you can peek at the notes as much as you want, but you do not have to bring them to the piano with you. Approach the piano and see how far you can play from memory. If you are stuck, go back to the table, and find out by looking at the notes where you are stuck and why. Then go back to the piano and try again. If you adhere to this approach and follow the principles above, you must remember your play in no time at all. However, this is a psychologically laborious process. Mentally lazy people hate it.
The first time you try all this, you will find it huge. But if you continue to work in a systematic, disciplined manner, each subsequent fragment will become easier. Then memorization will be so natural for you, that you will exercise it without even noticing!
And this is just the tip of the iceberg.