Prepositions can be pretty confusing—individual prepositions can have lots of different meanings, and the differences between prepositions can be really subtle, especially when we're not just using them to talk about where and when.
If you're not sure which one to use in a particular sentence, the best thing you can do is just try some you think might work and then pick the one that feels the most right to you. Still not sure? Ask a friend!