Is it precaution for whole namaz or only for tashahud?
I recite it, so what for the previous prayers where I recited and what for the next if I recite it mistakenly? Would iI have to offer prayer again?

It’s only in tashahud. You can read it in qunoot, ruku and sujood. Your previous prayers are ok