@n targets the closest nearby living entity, including players, whereas @p targets the closest nearby player. Since shards can only be awarded to players, @p should be used instead to prevent errors.
|
- Place a command block with e.g. `/shard award @n [shard]` - this collects the shard for the nearest player |