Whenever I click on my wallet, it opens directly and load the wallet file. However, I assume this is not safe. So how do I set a protection or encryption on the actual wallet? And how do you keep the backup file safe? I need a encryption for that, so each time I want to open the file, I will have to type a password.
This is not supported in Electrum for technical reasons.
The password you enter at the creation of the wallet
only protects for sending bitcoin and viewing the seed / private keys.
Looking at your balance can not be password protected for technical reasons.