Hi TonyFadd,
Welcome to Apple Support Communities. It sounds like you are composing an email from Gmail webmail in Safari when this happens. Right?
Do you have the same issue if you add an attachment to an email in the Mail app? Guidance below is from Add attachments to emails in Mail on Mac - Apple Support
"Include photos and other files in emails
In the Mail app on your Mac, do any of the following in a message you’re writing:
- Click the Attachment button in the toolbar, locate a file, select it, then click Choose File.
- You can also drag files from the desktop, the Finder, or an app into your message.
- For photos, click the Photo Browser button in the toolbar, then drag a photo into your message. You can also take a photo or scan documents, or add a sketch, using your nearby iPhone or iPad.
- To forward an email as an attachment, select the message, then choose Message > Forward as Attachment. Or drag a message from the message list into the message you’re writing."
If this only happens in Safari, try all sections and steps from If Safari on Mac doesn't open a webpage or isn’t working as expected - Apple Support which can help with issues with individual websites.
Take care.