I believe if they are the same model MacBook, or at least can both run the same version of macOS, then yes, a "restore" should put the macOS system from the backup onto the second Mac and it should work. I haven't done that myself, though. EDIT: you'd have to boot the second mac into Recovery mode and choose "Restore".
Typically, I think you'd install macOS on the second Mac, then after that was done, attach the TM backup disk and run Migration Assistant (on the second Mac) to copy over settings and files.