If your sheild meter isn't full, stars charge it by 1, and when it reaches 40, you get a sheild, and when you take damage with the sheild, the sheild meter goes back to 0.
When you reach 60, you get your first bubble. If you break it, for the next bubble it requires 120 stars. Yours stars can exceed the limit and also is retained each time you break a bubble. If you die, you lose all your stars.
That's not how it works. If you get 40 stars (not 60), you get your bubble, if you lose it right now, you'll need 80 stars in total to get your bubble back. If you have 40 stars and get 1 more so you have 41, then lose it, you'll need 81 stars in total to get your bubble back.