std::map<Key, Value> stores key and value pairs sorted by key; std::unordered_map stores them in a hash table, with no order but faster lookups on average. Both offer the same main operations:
m[key] returns the value for key, and inserts a default value first if the key is missing. That is handy for counting (counts[symbol]++) and a trap for reading: looking up a missing symbol adds it.
m.find(key) returns an iterator to the pair, or m.end(). It never inserts, and it works on a const map, where [] does not compile.
m.at(key) returns the value or throws std::out_of_range.
m.contains(key) (C++20) answers yes or no.
Looping over a std::map visits keys in sorted order: for (const auto& [symbol, qty] : m). Looping over an unordered_map visits them in an order you must not rely on.
operator[] for counting, find for reading, and a sorted loop.