Welcome to the board. Not sure why they downvoted you. But here is how to do what you asked.
Option Explicit
Public savedDomain As String
Public Sub Example()
Dim mi As Outlook.MailItem
Dim emailAddress As String
If Not TypeName(Outlook.Application.ActiveWindow) = "Inspector" Then
Exit Sub
End If
Set mi = Application.ActiveWindow.CurrentItem
emailAddress = mi.SenderEmailAddress
'Save it a variable like you asked.
savedDomain = Mid(emailAddress, InStrRev(emailAddress, "@") + 1)
'But... State loss can do weird things, so I'd save it to registry
VBA.SaveSetting "MyExampleProgram", "SomeSectionName", "SavedDomain", savedDomain
'You get it back like so:
MsgBox VBA.GetSetting("MyExampleProgram", "SomeSectionName", "SavedDomain", vbNullString)
End Sub