Good work LS! You learned by doing and fixed it yourself!
On the final cap shingle given that the tar strip is on the opposite end of the gable, you'll want to lay down a double bead of roof sealant on the gable end before adding that last shingle. That'll will stop blowing rain from getting in there.
Nail it off with four regular roofing nails (you need the big heads), coat each head with a squirt of roofing tar, then sprinkle the tar with shingle granules scraped from a scrap shingle. This will waterproof it and make the heads invisible from the ground.