JavaScript is around 22 years old, at the time of writing. But still, it lacks some modern software development principles, such as, OOP, strong-type, and more.
Note
OOP usually refers to the ability of encapsulation, abstraction, polymorphism, and inheritance. JavaScript has some techniques that mimic these concepts, but not in a native way, such as interfaces, classes, access modifiers, and so on.
Typescript is a modern way to develop JavaScript applications. Typescript is a superset of JavaScript, and it means that whatever you can do in JavaScript, you can do in Typescript.
Typescript gives you static typing, classes, interfaces, access modifiers, asynchronous execution, and so on, while JavaScript doesn't have those facilities. You can develop a frontend application using Typescript, and the Typescript compiler transpiles your code, turning it into equivalent JavaScript code. After all, the browser only understands JavaScript, so all Typescript code must be converted to JavaScript...