Hi @wachid
I have a sample flow for you.
1. Create an automate flow & choose the trigger as 'When a new channel message is added'. Set the team & channel as per your need:

2. Next, add "Apply to each" action to iterate the attachments in the message. Pass the 'Message attachments' from the dynamic content as shown below:

3. Now, inside apply to each block add 'Get files (properties only)' action. In the site URL set the teams site where message is sent. Similarly, set the source team channel folder in 'Limit Entries to Folder' where messages are being posted:

In the above action, set:
Site Address: <source team site url where messages are being posted>
Library Name: Documents
Limit Entries to Folder: <source channel folder where messages are being posted>
Filter Query: FileLeafRef eq '@{items('Apply_to_each')?['name']}'
Next, add another "Apply to each" action and pass the value object from get files to it:

Inside "Apply to each 2" action, add copy file action to copy the attachment to desired folder:

Set the source site URL & document library of the team site where messages are being posted. Set the destination site & folder as per your need.
If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.
Thanks