“Itadakimasu” is a word that expresses gratitude, not just for the ingredients of the meal itself, but all the effort of the people involved with the meal.
“Gochisousama deshita” is another expression used to convey gratitude for delicious meal that has been eaten.
I think “Itadakimasu” and “Gochisousama deshita” are wonderful aspects of Japanese culture.

They are both commonly used at mealtimes in Japanese households, but when eating out, “itadakimasu” is often ommitted, especially if you are eating by yourself.
Saying “Itadakimasu” alone can feel embarrassing, so some people just bring their hands together in gratitude.
However, many Japanese people are still sure to say “Gochisousama deshita.”
There is always an opportunity to say it, since you have to see someone to pay the bill, and you can say it as you are heading out the door, so the hurdles are low. Be sure to give “gochisousama deshita” a try in place of “arigatou” when thanking restaurant staff for your meal.

Lets look at ways to use it, step by step

Step 1: “Gochisousama deshita”. This is a polite way to say it and is ideal for beginners.
Step 2: “Gochisousama” A more frank, curt expression to use once you get the hang of it.
Step 3: “Gochisousan” or “Gossan”.

Step 3 is the kind of phrase often used by regulars at a restaurant, so by using it, you will be sure to stand out from other visitors. Especially in the kansai region, “gosso-san” feels very authentic to the region, and can give a sense of familiarity and comfort.

If you can advance all the way to step 3, you should be able to enjoy Japan even more than before.
However, it would feel a little strange if you used it in a fast food restaurant, so it might be best to avoid using it to be on the safe side.