If you attack a valley or flat and do not have the slots available to capture it, you will still be able to loot resources from it!
Early on it might be valuable to loot nearby valleys for resources. Just send some workers or transporters along with your regular troops and they will carry resources back. Valleys contain resources based on the type of valley you conquer.
If you raid a grassland, lake, or swamp you will bring food back with your army. If you raid a desert you’ll bring stone back with you. If you raid a forest you’ll bring back wood. Etc. If however you conquer the valley so that you “capture” it, you will not bring back resources with you. Instead you will get a production bonus at your city for producing that type of resource.