I found the solution.
Go to Terminal and type
zip -er (zipfile’s name).zip (File path)
Enter password: (your password)
Verify password: (type it again)
press enter. That’s it. It will be saved to your main folder. You have a passworded zip file now.