Ibuprofen is indicated to treat symptoms of pain and fever as they occur. This is consistent with the clinical study approach used by Pfizer and Moderna for treating symptoms as they occur with their approved COVID-19 vaccines.
Health authorities and scientific professional societies in the USA, Canada and Europe, including the CDC, recommend taking an over-the-counter medication, such as ibuprofen, for possible pain or discomfort from a COVID-19 vaccination.
You should carefully read and follow the instructions you receive when you get your COVID-19 vaccine. Talk to your doctor or pharmacist if you have any questions.