To unlock the Elementary trophy in The Sims 4, you will need to reach level 10 in the Logic skill.
The quickest way to reach level 10 in the Logic skill is to buy the three Logic books which will bring you up to level 9, and then buy a chess table and keep playing chess until you complete the final level. For an added speed boost, you can use the Science Lair lot trait for a +50% skill gain.
Once you reach level 10 in the Logic skill, the trophy will unlock.