Groundworks is a broader term that includes all the work needed to prepare the site for construction, such as excavation, drainage, and utility installation.
Foundations are a part of the groundworks and specifically refer to the structure that supports the building or surface (like a car park), distributing its weight to the ground safely.