Functionstake () and limit () will not work with heavy loading if you get the parent model more than one using the get () method.
So you need to do a different path,
$categories = Category::with('contents')->get();
$categories foreach, ,
$contents = [];
foreach($categories as $category){
$category->limitedContents = $category->contents()->with('languages')->limit(4);
}
4 limitedContents.
. limitedContents, .