Use named routes, they are convenient and you can manipulate models, not IDs. If you have a route:
Route::put('/book/{book}', [ BookController::class, 'update' ])->name('book.update');
and a controller:
// BookController.php
public function update(Book $book)
{
// ...
}
then this:
$book = Book::where('name', 'Harry Potter and whatever')->first();
route('book.update', ['book' => $book])
will generate this URL: https://yoursite.com/book/123 (assuming 123 is the id of the book "Harry Potter and whatever")