Sometimes because of my OCD i perform the prostration of forgetfulness even though i feel like it's probably not necessary. Does that invalidate the prayer because i added something to it? I would appreciate a direct answer, thank you very much.
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.
It is not permissible to deliberately make any additions in the prayer. Deliberately making addition of prostration for forgetfulness before the Tasleem renders the prayer void without any doubt.
However, if this was due to whispers, then we hope that your prayer is not void. Nonetheless, you have to strive against these whispers and not be carried away with them, and not comply with the command of the devil to prostrate for forgetfulness, as being carried away with whispers leads to a great evil.
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