I think the bigger questions are:
a) what kind of files?
b) who are you sending them to?
The iPhone doesn't have the same level of 'file' concept as a typical computer system - there's no Desktop or Documents folders, or even a file browser in the same way.
Instead, documents tend to be application-specific. For example, individual photos are managed within the Photos app, Audio tracks are managed within Music, etc.
However, what iOS does have is a near-universal share mechanism whereby most apps have a Share option, denoted by the icon: 
Clicking this button will bring up a number of ways to share the document.
If it's going to another iOS or Mac user nearby, you can use AirDrop to send it directly to their device (they will have to acknowledge receipt - you cannot force the document onto their system).
If the user is in your contacts, you can send it to them via either email or Messages
If you use group messaging applications (Slack, Teams, Discord, etc.) you can send it through those platforms.
If you use cloud storage systems (iCloud, Google Drive, OneDrive, Dropbox, etc.) you can send the document there and get a link to send to the other user.
The 'right' way depends a lot on the kind of document you're sending, and who you're sending it to, but there are numerous ways of getting it there.