It‘s just something you have to get used to. I know it’s tedious, but it can be done. My second language is German and it’s the same thing. You just have to know which prepositions go with what verb and which to use to form which expression.
Im a native US English speaker, so it’s just something you pick up as a kid. But, I’ll never forget something growing up. My little sister used to always say „I did that ON accident.“ I guess at the schoolyard kids said that. I don’t know. This drove my mom nuts hearing „on“ in this sentence and she’d always correct my little sister, „It’s BY accident, not ON accident!“ I think after being corrected about 50 times, my younger sister started saying „by accident“ and never said „on accident“ again. Funny how I’ve never forgotten that.