Investigation is intelligence based and involves looking for clues and making deductions. A clue is not an object. A clue is the significance of an object. You first have to spot the object to have a chance to utilize it in investigation. It speaks to using your intellect to figure something out. It is how you USE data, not how you collect it.
Perception is wisdom based and is your ability to perceive something that does not fit, but has nothing to do with understanding the significance of it.
How do they work together? You need both perception and investigation success in order to locate, and then understand, something (whether a trap, a secret door, or to deal with any other mystery. HOWEVER, both can be used passively. Meaning that you can automatically succeed on these rolls without spending any effort if your passive scores are high enough.
HIDDEN PIT TRAP: You need a DC 14 Perception check to spot it. We don't even both mentioning the DC 5 Investigation check necessary to understand how it works, because it is obvious. If you want to stop it from collapsing when walked upon, that might be a Thieves Tools Check, a Carpenter's Tools Check, or something else - The DM and the Player bounce ideas together.
SWINGING BLADE TRAP: You step into a room and see swinging blades. They're obvious. You don't need to roll a perception roll because a someone with a 1 Wisdom and disadvantage on the roll would have a passive high enough to get the DC 1 Perception check, However, figuring out how to disarm it ... that is tricky. To get it to hold might require a very high tool check.
POISON GAS TRAP IN A CHEST LOCK: You Need a DC 17 Perception check to see the mechanism for it. Once you see it, you need a DC 15 Investigation check to figure out how it works. You need a DC 20 Thieves Tool check to disable it. It is entirely possible your passive Perception and Passive Investigation could be high enough that you would not need to roll. If not, DMs are going to create a better experience if they consider all your rolls and allow success on an earlier roll to either lower the DC (or give you advantage / a bonus) on a later roll. For example, Bob the Rogue passively sees the mechanism. He says he wants to take a closer look. He rolls a 20 for a total perception check of 30. The DM thinks that is high enough to make the investigation check easier, and tells Bob that he sees a gear based mechanism and a glass cylinder suspended over a container of liquid. He gives Bob advantage on his investigation, which raises his passive investigation above 15, allowing him to automatically figure out that it is a poison gas trap. Bob says he wants to figure out exactly how it works, so Bib rolls an Investigation and gets another 20, giving him an Investigation of 23. The DM gives Bob advantage on a roll to disarm the trap after describing that one of the gears appears loose, and knocking it out of position would prevent the trap from springing.
It makes sense when you think about the questions, "How hard is it to spot that there is something unusual?" and "How hard is it to figure out how it works?" That'll tell you what rolls need to be rolled, and which can be passively successful.