Usually, you would use the Windows Credential Manager for this (they are securely stored.) You can have a look at the System.Credentials namespace (e.g. Get Secure Credential).
If you are using Orchestrator, you can also manage your credentials Orchestrator-side as Credential Assets (e.g. Get Credential)
Finally, there is the legacy Get Password activity which keeps the password encrypted inside the xaml, but you will not be able to run it on any other machine. It is seldom used nowadays, but it is still there.
Note that since you have access to basically all of .Net, you can very well use Invoke Code to implement your own encryption in VB if it can better fit your needs:
Thank you for the idea.
Do you know the function to encrypt variable in UIPATH?
Because UIPATH wants to make it understandable by everyone.
Is it impossible with the function of UIPATH?
I want to make it work like everyone knows.