Can your brain make a shift overnight?

I always struggled with sugar and flour but as soon as I watched the Overeating workshop and heard Brooke explain that when you’re committed in your marriage you don’t allow for any grab ass and that provides you freedom, it was like my brain completely made a switch and stopping sugar and flour was a nonissue. I haven’t eaten it or wanted it since I saw that video.
Same thing about scarcity mindset with money but when I read her podcast about Abundance Assets and read that the brain is the most valuable asset and money will always be created from the brain, then the thought of scarcity and money doesn’t exist because my brain is what makes money.
My question is: Can your brain do a complete 180 in thought if the explanation makes complete sense?