Enjoy your AppleScript journey :)
This is a perfect example of the kind of progress most people go through when learning AppleScript.
In the beginning, you start of by trying to replicate the actions you would take normally (press these keys, click these buttons...) into where AppleScript's true strength lies, namely directly manipulating objects (in this case email messages). The joy? pain? comes in making that mental jump.
I have two comments to your script. In your final script you select the message via MessageID, which is perfectly valid and pseudo-unique. Just be aware you can select via any property of the message:
-- your code
open (first message of inbox whose message id = MessageID)
-- check for a sender in a specific mailbox
set theMsg to first message of mailbox "INBOX" of account "iCloud" whose sender is "hello@somewhere.com".
-- check for a subject
set theMsg to first message of inbox whose subject = "Super Important Message"
-- check for a flagged message
set theMsg to first message of inbox whose flag index = 5
As for your earlier approach:
> I don't know how to press 3 keys since I need to press command option command f
There are valid cases where you need to emulate keyboard presses. In this case you need to look at the optional parameters to the keystroke command to incorporate modifier keys:
keystroke "f" using {command down, shift down, option down}
You can use any combination of the modifiers, as needed.