@ysmina-- My doctor told me not to do any back exercises when I am in a lot of pain. That could make things worse. It could worsen the injury or even trigger a spasm. So it's best to rest and take medications and wait for the pain to go away.
What my doctor did say was that when I do back exercises as directed by him, I may experience some mild temporary discomfort for about half an hour after. This does happen sometimes and I know that it's okay. I recommend doing any exercises after a hot a shower or after applying a hot compress to your back to relax the muscles. It will make it easier and reduce the risk of any injury. And you should never push yourself too far or do exercises that your doctor has not approved.