Time Machine opens and shows your available backups.
Click the date of your last backup, navigate to the backup of your photo library, then click to select it.
Click Restore.
Depending on the size of your library, it may take some time for your library to be restored. When you next open Photos, you should be able to use your Photos library as it was when last backed up.