It is the same of document.querySelector
if jQuery is not used :
$(SELECTOR);
// are same if jQuery is not used
document.querySelector(SELECTOR);
note that document.querySelector
returns the first HTMLElement
which satisfies the SELECTOR.
IF you want to get all elements , use document.querySelectorAll
instead which is $$
$$(SELECTOR); // double dollar
// are same if jQuery is not used
document.querySelectorAll(SELECTOR);
Firefox :

Chrome :

PART 2 of question : Build something like jQuery :
The below example is a Proof Of Concept which handles only the first selected element .
function $(selector){
return new MyQuery(selector);
}
class MyQuery {
constructor(selector) {
this.element = document.querySelector(selector);
}
html() {
if (! arguments.length )
return this.element.innerHTML;
else {
this.element.innerHTML = arguments[0];
return this; // !! important for call chaining
}
}
}
//-then -- Use it :
console.log(
$('section').html()
);
setTimeout(() => {
$('section').html(' I am changed by MyQuery');
console.log(
$('section').html()
);
}, 2500);
<section>I want to be extracted by MyQuery</section>