To handle smooth-scrolling there are two main possibilities.

The fastest solution (but also the least compatible and configurable) is applicable with a css line:

html {
  scroll-behavior: smooth;
}  

In js there is much more choice, but if the goal is to scroll to a specific element/section of the page, Element.scrollIntoView is perfect.

element.scrollIntoView({
  behavior: "smooth",
  block: "start",
  inline: "nearest"
});  

The support for this property is quite good.