What is the meaning of "meterpreter session"? My understanding is it is a session that we can send commands to the host for execution. And a meterpreter session is created when we don't get a shell.
And a meterpreter session is created when we don't get a shell.
This is wrong. When you use Metasploit, you choose the exploit you wish to use, and often times the payload you wish to execute. This payload could be a specific action on the target OS (e.g. create a new user, delete a file, etc...), an OS shell or a Meterpreter shell.
What's the difference between Meterpreter and an OS shell?
Meterpreter is a program that's supposed to make post-exploitation a lot easier. It allows you to manage your initial session on the target machine, such as migrating into an existing process, or killing AV, if that's a problem.
Best of all, it allows you to load other post-exploitation modules, such as Mimikatz, which can be used to dump credentials or perform further attack.
And finally, Meterpreter can also act as a regular OS shell. So for all intents and purposes, Meterpreter sessions are preferable.