If it is many to many that means that each list has an array of items..
So in your List model you should have :
public function items()
{
return $this->belongsToMany(Item::class);
}
given the fields and the table name are following Laravel's naming convention https://laravel.com/docs/8.x/eloquent-relationships#many-to-many-polymorphic-relations
Then from what I see above, you have an array of lists or whatever that is, I hope it is IDs of lists that you have:
So you can do the following:
$listsWithItems = List::has('items')->with('items')->whereIn('id', $request['lists'])->get();
Here again I am assuming that this $request['lists'] is an array of LIST IDs that you have in your database.
So the $listsWithItems will return back only those lists that have any items, and it will return the items with them.
Hope this answers your question or at least gives you a path on where to look at.