Bootstrap reads attributes that start with data-bs-. They start a component and give its target and options, so for many components you do not write any JavaScript.
Attribute
Meaning
data-bs-toggle
Which plugin to start (modal, collapse, dropdown, tab, tooltip, popover, offcanvas, button)
data-bs-target
Selector of the element to control (or use href on links)
data-bs-dismiss
Closes an alert, modal, toast or offcanvas
data-bs-OPTION
An option, like data-bs-backdrop="static"
In Bootstrap 4 the attributes were data-toggle and so on. See Bootstrap JavaScript.