Assalamu alaikum, I was praying fajr and I doubted if I said rabbi ghfirli which is obligatory according to some people so I made sujud sahw. when I went down for the second sajdah in the sujud sahw I noticed that I forgot to say allahu akbar and my head was already on the ground for a moment but I hadn't really settled yet so in a quick moment of uncertainty I just lifted it a bit to say allahu akbar and did the sajdah. Do I have to repeat the prayer? I am someone who has excessive doubt (OCD/waswasah).
All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
Your prayer is valid in any case and you did not have to prostrate to forgetfulness. Rather, the treatment of whispers is to avoid them, repel them, and not pay any attention to them.
You do not have to prostrate for forgetfulness due to them.
For more benefit on whispers and how to repel them, please refer to Fatwa 174507.
Allah Knows best.
You can search for fatwa through many choices