Prepositions are hard
In learning Italian, getting the prepositions right has been a maddening effort for me. I really think there is no way to get this through rules: you just keep at it until 'a' or 'in' or 'per' or 'di' etc. seems natural to you in the right spot. But even among speakers of English across the globe the question of what preposition to use is not easy, as shown by this group of linguists fighting over whether they were dining 'on the weekend' or 'at the weekend.' And for Americans 'X is different than Y,' while to Brits, 'X is different to Y.'