You can mine in space from your ship, or on a planet on foot. The difference is where the material goes.
Territe deposits are common underground on Azure planets. Right click something. If you see Mine, you can mine it. Material you mine yourself goes into your inventory.
Your pod can mine. In the galaxy, right click asteroids, comets, and similar objects. If they can be mined, Mine appears.
Ship mining does not go into your personal inventory. It lands on the ship. It will not stack neatly, and mining stops when the floor is full. Build a Bulk Container for most materials, or an Ice Container for ice, and the ship will store into those.
Complexity applies to mining. If your mining skill is low, the beam can feel weak. That is fine. It just takes longer.