These ideas come from Satan so that he can try to slow you down or to divert you from going to Allah’s way.
You should try to ignore these thoughts, knowing that Allah forgives what a person thinks of providing that he doesn’t tell anyone of it and that he doesn’t do it.
You should also try to occupy yourself with useful things and above all, try to stay away from things that remind you of such thoughts and ideas.