I had a fear of a jinn and I'm doubtful but I remember thinking of munkar and Nakir and turning my fear to them I get doubts I did kufr? Also I saw the Hadith of hafsaandsafiyya and thought unspeakable words of hafsa Ra from anger twice is this kufr? These two situations worried me greatlyiswaswas?

Ustadh AbdulAziz al-Haqqan
As I have mentioned to you before, you need to work on your compulsive disorder (waswas) and try to seek some medical help, or to ignore these thoughts and move away from them. Of course, first and foremost, turn to Allah; make dua to Allah subhanahu wa ta'ala to push away these thoughts from you.