* In the United States, (in general) "wagon" is one specific type of "cart." So "cart" is a general term for something that has wheels and is either pushed or pulled by a person or animal. It is really any type of large tray that you can put things on and push around. Examples: https://www.amazon.com/s/ref=nb_sb_noss_1?url=search-alias%3Daps&field-keywords=cart
*In general we use the word "wagon" as a specific type of cart, usually one that can carry people. Examples are "covered wagon" (like the kind that were pulled by horses 200 years ago), or "wagon" that you can pull a child or a few children in.
HOWEVER, there are many instances where the two words can be interchangeable. For example, a fruit vendor could call his fruit-stand-on-wheels either a "fruit cart" or a "fruit wagon." Although the former would be more common, the latter is okay too, and probably nobody would think it was very strange.
Oh, and you are correct about "trolley." However, in the USA "trolley" usually refers to the old-style that ran on cables. The new style that we use currently (they are like mini trains) are generally referred to as "trams" or "trains."
ONE MORE NOTE... It is common both regionally and culturally in some areas of the USA to refer to a "shopping cart" as a "buggy."