If I would know what you did to collect 4 containers to get one container I might know a better way to hijack the code. The problem is probably that one value is saved to RAM but should go to SRAM to keep the value between save sessions.
Here a example how I would hijack the code with my current knowledge.

On the bottom right you see that SRAM is mapped to CPU bus $6000-$8000. This is impotent since the CPU can only access the CPU bus. It talks to PPU over registers that are mapped to the CPU bus.. just to get a idea how this works.
I made a breakpoint and you see how I stepped code where you heart-container will add one up and health will get refilled. On the left bottom you see a assembler with some code I documented. There I made a jump to a location where I can put code. I could INC (increase) a value in SRAM and then compare that number to #$04. Then when it is equal I would reset that counter and add the heart-container. Else skip that part.
Learning to code will not happen over night. You will find the best documentation for the NES on wiki.nesdev.com.
You will study opcodes and how to use them. Probably follow tutorials on different pages and experimenting a lot.
Here a good list of opcodes and the hex equivalent.

If you really feel lost and you liked to learn to code for a 6502 you can also join my discord. There are channels for questions about it.
**NEW**
I probably did not explain it properly and did think I could write you a ASM file that would explain it better.. but..
I did try to create a ASM file with ASM6. I could not get it to include the code to a existing Zelda.bin. It will overwrite it or put it on the end of the file. I tryed for a view hours to get this to work but failed with any attempt. I find it very easy to do this sort of thing on the SNES and tools like asar or xkas. I think it would be the best way to learn to code and write small patches with it. It is easy to apply and change after. I could not find any ASM6 patches and I am glad if anyone could show me one. I found only large scale projects so if anyone knows where to find a example patch I would like to learn how to use it properly on the NES too!
I did not explain that you need to allocate the code at PRG $6c7d (pointer) PRG $7751 (new code) You can write out the code as hex in the memory editor or use the build in assembler in a debugger.