If i am not wrong, you want to know the process from scratch, from registering the app to azure portal to calling teams API , right?
If you are trying to build a console app for your testing purpose, please see the doc - https://learn.microsoft.com/en-us/azure/active-directory/develop/console-app-quickstart?pivots=devlang-dotnet-core, you can register your app in as daemon app. please go the C# sdks doc - https://learn.microsoft.com/en-us/graph/sdks/sdks-overview to setup the SDKs in your local, and then use the teams api - https://learn.microsoft.com/en-us/graph/teams-concept-overview
when you are done with all , and called sample request , kindly use docs to get and send message - https://learn.microsoft.com/en-us/graph/api/chatmessage-get?view=graph-rest-1.0&tabs=csharp
hope this helps
thanks