It depends on the spell.
In general, my reading is that the spell effect comes into existence in the specified area, and any subsequent alterations to the area don't change that.
But, it depends on the spell description. Some spells are explicit that the effect in the area is ongoing and directional, in which case an appropriate piece of cover should exclude that part of the area.
For example, gust of wind creates "a line of strong wind 60 feet long and 10 feet wide" that "blasts from you". It seems obvious that if a wizard throws a wall of stone into the path of the wind, it should stop the wind. You wouldn't have the wind blasting from the enemy caster, then somehow going through the wall to continue to fill the previously defined area.
Similarly, a moonbeam spell "shines down", and I would certainly expect that tossing an opaque horizontal surface in the way would create a shadow that's protected from the beam.
But on the other hand, there's no reason to think that putting a wall through a patch of entangle or grease stops the plants from being big and enchanted or the floor from being slippery.
I think the area continues to be the area of the spell unless the spell specifically calls out or implies that something is being continually emitted from the origin point. I know that isn't a great answer, but I don't think there's a single rule that makes sense in all cases. Certainly "put a bucket over the origin" would be absurd and potentially trivializing for a lot of magic.
There's a notable "exception that proves the rule" in darkness and daylight, which both have similar text that specifically allows bucketing the spell:
If the point you choose is on an object [...] the darkness emanates from the object and moves with it. Completely covering the source of the darkness with an opaque object, such as a bowl or a helm, blocks the darkness.
The fact that this is called out in specific is evidence that spells are not expected to work that way by default. Furthermore, darkness and daylight themselves can't be blocked by a container if they're targeted at a point in space rather than a physical object, since the "covering" text is only given in the section about having an object that emanates light or darkness.