JQuery uses its own structures, so you cannot use square brackets to get the first element and then keep using JQuery instructions as it returns a native HTML element.
You should use .first() instead to get the first element (or .eq(i) to the the i element)
$("li").first().css("color", "orange");
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<ul>
<li>Candy</li>
<li>Fruits</li>
<li>Chocolate</li>
</ul>
If you want to mix JQuery with native HTML (not recommended) you could with this:
$("li")[0].style.color = "orange";
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<ul>
<li>Candy</li>
<li>Fruits</li>
<li>Chocolate</li>
</ul>
.eq(0)to get the jQuery object$("li")[0]returns the native<li>element which would be identical todocument.querySelector('li')BUT native elements don't have acss()method, that is a jQuery object method