Partition for manageability, Sharding for scalability.
Partitioning
Dividing data into segments (partitions) for easier management or to group related data together.
Often used within the same system and transparent to the application.
Sharding
Splitting data across multiple databases or servers to distribute the load and scale horizontally.
Each shard operates independently, and often, the application needs logic to direct queries to the correct shard unless the data storage system transparently supports the redirect.