You can't actually transfer ownership, but you can grant someone access to a file.
In your work or school account, you can change permissions for an item. You can also move a file or folderĀ to SharePoint for better team or project access. For more info, see Save files to OneDrive or SharePoint.