5th dnd – If a spell is cast on a creature / moving object and lasts longer than the turn, and the creature / object moves, does the spell move it?

Spells only do what they say. The spell will tell you if it moves with an object or creature on which you centered it.

If the spell moves with the object or creature on which it was initially centered, it will say it.

In the description of the spell Darknessfor example, it is stated that

Magic darkness spreads from a point you choose in the range to fill a 15-foot radius sphere for the duration. Darkness is spreading in the corners. A creature with Darkvision can not see through this darkness and a non-magical light can not illuminate it. If the point you choose is on an object you are holding or on an object that you are not wearing, the darkness emanates from the object and moves with it. Completely covering the source of darkness with an opaque object, like a bowl or bar, blocks the darkness.

The accent is mine. The description of Darkness Clarify when the spell will move based on the point you have targeted, that is, this item is on an item you are holding or on an item that is not being worn or by another creature.

The spell Cloud of fogon the other hand, states:

A sphere of fog 20 feet radius appears within your reach until a wind of at least 10 miles to the hour hunting, or until the end of fate. The fog is centered on a point of your choice, spreading in the bends and obscuring strongly the area it fills.

This spell does not mention anything about the cloud moving with the object or creature on which you have centered the spell, so that it does not move with that object or that creature.