It’s okay to be on a learning curve, Leslie.
One suggestion I have is asking “How will I feel later on?” and you discovered that eating one of those things was fine!
And it looks like there’s a bit of confusion about “wanting the cake”. So, “I can have it if I really want it” might be better thought of as, “I can have it and it’s very likely I will want it” (= you’ll feel addictive desire for, attraction towards the cakes). You say you don’t think you really did want that cake but felt overpowered in some way. I suggest you did want that cake, you had an addictive desire for it but struggled to identify and name that.
And – it’s okay to be on a learning curve, Leslie 🙂