Lottie animations generally do not have backgrounds as creators tend to make them without so that they can easily be used in webpages and mobile apps. If a Lottie does happen to have a background, it usually can be removed or have its color changed using the Lottie Editor.
GIFs on LottieFiles can have their background changed. Above your chosen Lottie you'll see the 'Convert to GIF' button which will take you to the Lottie to GIF converter.
Once at the converter, you can select the background color you want for your GIF. Click 'Convert to GIF' and you'll have your GIF with that solid background color.
Some Lottie animations may already have been created with a background as part of the animation design, and in those cases just use the Lottie Editor to remove that layer, download it as a new Lottie and then drag and drop that new file to LottieFiles and go to the Lottie to GIF converter where you can then add the color you want.
For MP4 versions of the Lottie animation, there is not yet a way to change the background color and download it. However, a hack could be to change the background color when you open up the animation and then do a screen-recording of the animation with it's colored background.