This Problem facing almost everyone , you set a lock screen password in a hurry and cannot remember it the next day. To unlock your device again, you need to reset the password (or PIN, pattern, etc). There are two official methods of doing this.
1. Reset Your Lock Screen (Patterns Only)
If you set a pattern to unlock your device, you are in luck. Try to unlock your Nexus device 5 times and a "Forgot Pattern" option will appear. After selecting that, you can enter your Google Account email and password to unlock your device and reset your pattern. If this method does not work for you, try the method below.
2. Reset Your Lock Screen Pin, Password, or Face Unlock
This method is still official, but Google does not advertise it. This method assumes that Android Device Manager access is enabled on your device.
Open up Android Device Manager and sign in to your Google Account from another device. From here, click "Lock" next to the entry for your locked device. It will ask you to enter a password (a PIN will also work). After confirming this, hit "Lock" again (ignoring the optional text box).
Try to unlock your device using your new PIN or password. If it does not work, try waiting a few minutes. It may also be worth attempting this again.
Alternative Options
If neither of the above methods work for you, be it your device configuration or a fault on Google's behalf, there are alternative options.
There have been some cases of root users having success deleting certain system files to reset the lock screen password, so some research into this may be worth it if you have that level of access.
If all else fails, you could restore to a backup (from recovery) or factory reset your device (again, from recovery, be it a custom one or the stock one