Your hangar can only have 1000 item stacks in it. If you have more, your options are:
- Organise stuff in station containers, each which can contain 1000 item stacks and/or a maximum amount of m3
- Repair, repackage and restack a lot of items (so that instead of 500 stacks of 1 item, each in various amounts of disrepair, you now have 1 stack of 500 items… which counts as one item stack.)
- Reprocess a lot of junk, instead of 500 different items, you now have a couple of stacks of minerals.