Help with cat

Po
I'm sorry, I know this isn't related to humans. My cat hurt his leg somehow and has stopped eating. I took him to the vet this morning and the vet just gave him pain meds after an X-ray, but I know it's dangerous for cats to not eat. How can I get him to eat and will he be ok? He's only a year old and otherwise very healthy :( pregnant and stressed and my husband thinks I'm over reacting