this is definitely possible but the best approach depends on your telephony provider and whether you need call logging only or full transcription and analytics.
If you are using Dynamics 365 Sales, I'd first look at Conversation Intelligence as Travis mentioned. It can capture call recordings, generate transcripts, summaries, sentiment, keywords, and other insights, and store the resulting data in Dataverse. It supports both Microsoft Teams and approved third-party dialers.
Since you mentioned that most calls are not made through Teams, you have two common options:
First, Use a telephony provider that integrates with Dynamics 365 Sales via the Channel Integration Framework (CIF) or a certified CTI connector. Many providers can automatically create Phone Call activities, relate them to Contacts/Accounts, and optionally store recordings and transcripts.
Second, Integrate your existing phone/SMS platform with Dynamics and Conversation Intelligence. Microsoft supports bringing call data from third-party telephony systems into Conversation Intelligence where recordings can be transcribed and analyzed.
For SMS/text messages, there isn't a single out-of-the-box Dynamics Sales feature that automatically captures texts from every mobile carrier. Most organizations use a messaging platform (for example Twilio-like providers, contact center platforms or other business SMS solutions) that integrates with Dynamics and writes messages back as activities or custom records in Dataverse.
Please mark this reply as verified solution if answer your question.