[Parameter #0 [ <required> $id ]] in class unable to resolve dependency

What seems to be the problem: I get this error and I don’t know what’s wrong here with my code
namespace App\Http\Livewire\Components;

use App\Models\Products;
use Livewire\Component;

class Delete extends Component
{
    
    public function render()
    {
        return view('livewire.components.delete');
    }
    public function delete($id)
    {
        $product = Products::where('id', $id)->first();
        $product->delete();
    }
}

and this is my ui component:


Delete

you must pass the parameter too by the wire:click

<button wire:click="delete({{ $product->id }})"></button>

I tried this and it gives me an error
ErrorException

Trying to get property 'id' of non-object (View: /home/example-app/resources/views/livewire/components/delete.blade.php)

I use that $product->id as reference, you must use your own data bind. How are you rendering the selected or the list of products that will be deleted?
If for example, you have a foreach in blade that loop through products collection must be like

@foreach($products as $item)
    <tr>
        <td>{{ $item->id}}</td>
        <td>{{ $item->name}}</td>
        <td><button wire:click="delete({{ $item->id}})">Delete</button></td>
    </tr>
@endforeach 

and in component

public function delete($id)
{
     $product = Products::where('id', $id)->first();
     $product->delete();
}