I agree with Kaio. One thing that could help is to think about the opposites.
From/to. They are about movement from a point of origin to a destination. So you can imagine getting information "from" a source, or place of origin for some reason that takes you "to" a goal, or destination.
Out of/in (into). Here, there is a container of something. A container has limits. I need to get out of the country. I need to cross the border of the country which is like a container of land and "into" or "in" another one.
In some situations, you can use both:
e.g. I need to take money out of my bank account (container of money)
e.g. I need take money from my bank account (source of money)