I'm sorry to hear that you forgot your password. There are a few ways you can reset your iPhone password from your Macbook, depending on your situation.
- If you have an Apple ID tied to your user account on Mac, you can use it to reset your password from the login window on your iPhone. You need to enable this option in System Preferences > Users & Groups > ‘Allow user to reset password using Apple ID.
- If you have access to another device that is signed in with your Apple ID, you can use the Find My app to erase your iPhone and then restore it from a backup. You need to have Find My enabled on your iPhone before you lose it.
- If you don't have access to another device, you can use Finder on your Macbook to put your iPhone in recovery mode and then restore it from a backup. This will erase all the data on your iPhone, so make sure you have a recent backup.
You can find more details and instructions on these methods on the following websites:
https://www.youtube.com/watch?v=zdKM8_OFCjQ
https://www.youtube.com/watch?v=oscEu0Lsx9w
https://setapp.com/how-to/how-to-reset-lost-mac-password
If you've forgotten your iPhone passcode – Apple Support (UK)