Copper is a metal that does not react with acids. With oxygen, it forms Copper Oxide.
Metal M is Copper and the black coloured product is copper oxide.
2Cu + O2 → 2CuO
Copper (Cu) comes below hydrogen in the activity series. Hydrogen cannot be displaced from metals that are below it in the reactivity series of metals such as copper because only metals which are more reactive than hydrogen can displace it from acids. Copper is less reactive than hydrogen hence it cannot displace hydrogen.