There are maps where treasure chests are already marked in the Map, ready for the taking. Unlocked treasure chests can be looted immediately by pressing Y. For locked chests, you have to defeat the enemy carrying it. If a specific enemy has the key, they will be marked in the map with the key icon. If the key carrier isn’t available in the initial wave of enemies you have to fight, you have to keep an eye out for the key carrier as he/she may appear as one of the enemy reinforcements that will appear later on. There are also instances where you'll receive the key from NPCs you helped by completing their Sub-Missions. If there’s a locked chest and no enemy carrying the key, just continue with the mission and watch out for battle logs and notifications. The key holder enemy will surely appear as reinforcements or optional targets.
Sometimes, a Thief will appear in battle and will run toward the unlooted chest to steal it. Fortunately, the thief will be tracked real-time in the Map so you’ll be able to intercept him without issues. A Thief will stop in his tracks and will try to engage you as soon as you get in melee range. The thief is quite squishy so you won’t have problems dispatching him once you catch up to him. In addition to preventing him from running off with chest’s contents, you can use the Chest Key he’ll drop so you can loot the treasure’s contents.