Actually, there are four ways of developing immersion, not just two...
The best summary I have found in the suttas is from DN33, which mentions four kinds of immersion:
Four ways of developing immersion further. There is a way of developing immersion further that leads to blissful meditation in the present life. There is a way of developing immersion further that leads to gaining knowledge and vision. There is a way of developing immersion further that leads to mindfulness and awareness. There is a way of developing immersion further that leads to the ending of defilements.
And what is the way of developing immersion further that leads to blissful meditation in the present life? It’s when a mendicant, quite secluded from sensual pleasures, secluded from unskillful qualities, enters and remains in the first absorption … second absorption … fourth absorption. This is the way of developing immersion further that leads to blissful meditation in the present life.
And what is the way of developing immersion further that leads to gaining knowledge and vision? A mendicant focuses on the perception of light, concentrating on the perception of day regardless of whether it is night or day. And so, with an open and unenveloped heart, they develop a mind that’s full of radiance. This is the way of developing immersion further that leads to gaining knowledge and vision.
And what is the way of developing immersion further that leads to mindfulness and awareness? A mendicant knows feelings as they arise, as they remain, and as they go away. They know perceptions as they arise, as they remain, and as they go away. They know thoughts as they arise, as they remain, and as they go away. This is the way of developing immersion further that leads to mindfulness and awareness.
And what is the way of developing immersion further that leads to the ending of defilements? A mendicant meditates observing rise and fall in the five grasping aggregates. ‘Such is form, such is the origin of form, such is the ending of form. Such are feelings … perceptions … choices … consciousness, such is the origin of consciousness, such is the ending of consciousness.’ This is the way of developing immersion further that leads to the ending of defilements.
All of the above immersions have their purpose. Understanding each of these has helped me a lot in my own practice. They all support each other and it is quite helpful to be mindful of what type of immersion one is practicing at any given moment.
If you'd like to explore any of these in more detail, you may find it helpful to use https://voice.suttacentral.net . For example, one can learn about concentration on the perception of day.