The easiest way to get it done is usually to also import its type definition:
npm i --save-dev @types/lodash
(Or you could use const _ = require('lodash'); to avoid this install, but you'll loose all the types benefits.
Finally, if your project is a javascript one, but you'd like to get the types benefits, and if you're using VSCode, there's some settings in jsconfig.json to save the install step (I never used this personally, usually using either Typescript projects or typeless JS projects)
"typeAcquisition": {
"include": [
"lodash"
]
}
(src: JavaScript in VS Code documentation)
HTH