We use 'will' for predictions or spontaneous decisions.
We use 'going to' for something that is likely to happen based on present evidence.
For promises, we usually use 'will'. However, 'going to' can also be used to express a firm intention, especially when it's a planned action.
We use 'will' to make an offer or a spontaneous decision.
We use 'going to' to talk about future plans or intentions.