Intended do shirk/kufr but did not do it

Question Assalamualaykum wa Rahmatullah If you wanted to do major shirk or kufr but you didn’t do it, does it put you out of the fold of Islam and your good deeds are erased? Even though you didn’t physically do shirk/kufr. For example your a muslim and you took...