It sounds like you are probably dealing with something called laryngitis, which is an acute swelling in the vocal cords. The symptoms of laryngitis include pain in the throat and a hoarse voice.
Most of the time, cases of acute laryngitis are caused by an infection of the throat with a common virus, such as the cold virus. However, there are also cases of acute mechanical laryngitis, which are caused by strain on the vocal cords from singing, shouting, and the like. This sounds like what you have going on.
Most of the time, a case of acute laryngitis like this will respond to rest (not singing or shouting) until the symptoms get better. It may also help to take an anti inflammatory medication like ibuprofen, if your doctor
says that is ok. Most cases will resolve within a few days, and your primary care doctor
can give you advice about which medications to take for relief of symptoms.
If you find that the hoarseness is worsening or persistent after a few weeks, then you will need a more formal evaluation by an ear, nose, and throat specialist
to make sure that there is not anything else causing the persistent problem. See your doctor soon!