In the same way someone may write a formal or informal email, imperative and declarative programming are terms used to describe a style of writing code. Rather than getting bogged down in explaining the semantics of the terms, the simplest method to understand them is to look at the below examples.
Both examples do the same thing, which is to create a new array of car makes from an array of car information. The difference is that the declarative method is much easier to read. It’s also easier to reason about as it describes the solution instead of displaying the procedure. Taking it a step further you can write declarative code by using a compose() to streamline your functions.
The benefits of this are simply that it saves on time for the developers, which is why there has been a big push in recent years to this style of programming. React for example, is known as declarative, whereby you are thinking about WHAT you want to happen, rather than HOW you want it to happen.
The point of the above is to identify declarative programming as a way to streamline your code and ultimately make you a better software engineer.