When uploading attachments, you will see a list of all pending attachments. You will have the opportunity to edit filenames before confirming the upload.
You can click on the filename to edit it directly.
You can also click the magnifying glass next to any pending upload to open the file viewer, where you can edit attachment details as well (or just in case you need to double check that you uploaded the right file).
From the file viewer, click the pencil icon to edit the filename (as well as alt text and descriptions for accessibility). After renaming, click the Save button to keep your changes.