You say fime de ação, not da ação, because we mean action in general, not a particular action: it’s an action movie, not a movie of the action. Likewise, apartamento de três quartos, not dos três quartos, because we just mean three rooms in general, not three particular rooms: a three-room apartment, not apartment of the three rooms. But you could say o apartamento dos três quartos amarelos if you meant an apartment with three particular yellow rooms that caught our attention.
And uma chave de carro is simply a car key, it could be any car. Uma chave do carro is a key of a particular car, like uma chave do carro do João. Roupa de criança is clothing for children in general; roupa da criança is a particular child’s (perhaps our own) clothing.
It often works as in English. cadeira (feita) de madeira (chair made of wood, wooden chair), but cadeira feita da madeira da árvore que nós abatemos (from the wood of the tree that…)
This distinction—de for general, do, da for particular items—will see you through in many cases, but it doesn’t cover everything. For instance we say mosca da fruta (fruit fly, not any particular fruit), bicho da madeira (woodlouse; bicho de madeira sounds like a toy bug or animal made of wood), or bicho do mato (literally ’animal from the bush, woods’; figuratively ’a shy person’).