Forgot to add more answer .
Sign in with the same Apple ID & password say example1@icloud.com on your iPhone & Mac and connect both with an usb cable Overview of syncing your Mac and your devices - Apple Support
Click on finder > general > sync
Let the bar be completely loaded .
Open your mailbox in iPhone
Click on edit option on the up-right corner
Click on “new mailbox” option on your down-right corner ,
In the new mail box , in the name section enter your iCloud id say example1@icloud.com
And set your mailbox location as per you requirement (iCloud / gmail) - prefer iCloud
Then again click on edit , you will see your apple id , under it you will find an option of “new mailbox '’on your right corner > chose the name for your folder and add the mailbox location ( iCloud id )> click on save > finally click on done .
The folder is created in iPhone , open www.icoud.com in mail section in the bottom left corner click on refresh , the mail folders will be visible after few moments , then open IMAP account in Mac Add or remove email accounts in Mail on Mac - Apple Support , under iCloud section in the bottom click on drop down arrows all mail folders will appear .