The only thing I can tell you with certainty is that you should indeed take lessons. Aside from your current problem (that you may well be able to solve by asking strangers on the internet given enough time and effort), playing the piano (or any other instrument) is a complex skill that involves, chiefly, hearing, motorics, something related to language skills and various kinds of memory. Most of this can not be learned from a book. You could learn to read notes and maybe some rudimentary technique this way, but making music is a skill only transmitted orally (and visually, when it comes to technique) and no book can beat personalised advice from an expert. Taking lessons with a good and engaging teacher guarantees incomparably better results.
However, reading your question some things come to mind of various degrees of importance, helpfulness and applicability.
First of all: practicing is a complicated skill in itself too. (Again, a teacher is in a much better position to provide you with specific help with this.) The way you describe your practicing, I would guess you spend a long continuous time essentially reading the notes and when you have figured out a note, playing it and moving on to the next, until you have made it through the piece. (Of course, this is speculation.) This way, you will have forgotten the start of the piece long before you have a chance to return to it, and you have to start from zero each time – voilà, a plateau. Instead, a much better way would be to practice a much smaller unit (in the order of magnitude of half a bar) until you can play it comfortably (that includes much more than just notes - rhythm, dynamics, comfortable motorics, articulation…), then linking these units together when you have a few of them. You can practice a few units in parallel, but no more than you have time for in a single day (otherwise the forgetting will get you again). Practicing should be done in chunks of no longer than 20 minutes (I guarantee you that two blocks of 20 minutes will give better results than 1 of 40 or even 60). Practicing every day also helps prevent the forgetting. I am describing an idealised practice plan and I am aware real life, motivation and discipline do not work this way - this is just to provide you at least some information on how to practice, take from it what you want.
Of course, this poses the problem of dividing the music in such smaller units. Ideally they should be musically meaningful and reasonably self-contained. As long as you don’t have a teacher to help you with this, you could try and figure this out by ear if a recording is available, but that could take a lot of time and effort and subdividing blindly by half-bars should be fine too - just keep your ears open and just deciding whether this one note across a boundary actually belongs on the other side is a great exercise for phrasing.
Secondly, you might be helped by the fact that it is possible to play in a way in between sight-reading and fully from memory. Here we can reuse above-mentioned units. If you remember all units individually (and contained in them each note) using mostly your muscle memory, you can use the sheet music as essentially a memory aid, seeing which unit comes when (recognising them visually and by basic aspects such as whether they are ascending or descending, stepwise or in jumps, have long notes or short notes, etc). Whether this could be helpful to you or even whether this is an achievable goal for you currently is impossible to tell for me through the internet.
Lastly, the second piece you posted is not at all the same difficulty as the first. The first only contains five distinct notes in each hand. (Actually the left never has a B so only four for the left hand.) That of course eases the note reading. Additionally, these two sets of five notes also happen to be adjacent, which means the hand can remain relaxedly in the same place for the whole piece (this is called “position playing”). The right hand only has one note at a time. (While the left hand has chords, they are very comfortable and straightforward because of the position playing.) There aren’t any flats or sharps at the clef either (or any accidentals for that matter).
The second piece, however, has two sharps as a key signature and regular accidentals. The right hand occasionally has two notes simultaneously (without any position playing to take away the complications that inherently brings). In fact, there is no trace left of position playing at all, whereas the normal learning trajectory eases out of position playing by first changing only one note in one hand once in the piece, then expanding to regularly in both hands, occasionally a piece which moves to a different position halfway the piece and then back again, then slowly expanding this. The two pieces are not at all of the same difficulty level. And I haven’t even mentioned the rhythmical complications of the second piece and the issue of fingering.
I hope these thoughts will be of some help to you, but none of it can substitute for lessons with a good teacher. That is the best advice anyone could give you.