Deadening the trunk lid may or may not affect how much bass you hear up front. If you can hear the rattle over the bass then It will clean the sound up at least.
There is a lot of different companies out there with varying prices and quality. If you live in a very hot climate I would suggest avoiding the very cheap stuff, As people report it melts And drips.
One of the best products on the market is sound deadener showdown. It is highly recommended quite often on this site and other sites as well.
https://www.sounddeadenershowdown.com/products
The cheapest option, If you can’t afford the deadener, would be secure a rib or two of structural support onto the underside. Such as a couple cross supports of 1x2 wood, secured with either screws or glue.
Personally I like to fire the sub into the cabin of the car and alleviate the trunk out of the equation altogether.