What would Iceland do if they weren’t part of Denmark? They would be a much poorer nation, wouldn’t they? Denmark gives a lot more money to Iceland than they take. Iceland has no oil, coal, natural gas, but they do have some geothermal and hydropower, but that is pretty much for domestic use so far.
You’re thinking of Greenland. Iceland declared independence from Denmark in 1944... when Denmark was still German captured territory.