Easiest thing to grow in containers is salad greens, lettuce, spinach, swiss chard. They don't need a lot of space and they don't need full sun, which means they can do ok in a bright window if you mean indoor containers.
Next easiest is probably herbs, basil, oregano, thyme, parsley. The basil likes a lot of sun, the rest aren't as fussy, and none of them are too fussy about soil, just don't overwater or overfertilize.
After that would be peppers, bell peppers or hot peppers. They do like a lot of sun, but if they can be in full sun, they do just fine in a good sized container.
For outdoor containers, people do grow most kinds of veggies in containers. Just be sure the containers are big enough and remember that containers dry out a lot faster than planting in the ground. If it is hot/dry you will have to water, maybe every day. As noted, you probably want to look for dwarf varieties.
Here's an article about it: https://www.mygreathome.com/outdoors/vegetables.htm