If you can, switch to a bigger device, but that was obvious.
Else you shall try to think different your alghoritm in order to use less resources (but I don't know if you can), moreover depending on the device you shall try to optimize the synthesis by area and enable some trick to use the resources you don't use and free the ones that are more.
For example if you've a lot of free ram you can map your logic in a sort of Look up table that you store in ram and read it when you need, but that's only an example.
Imo if you can it's really better to switch to a bigger device also because if it's has to be a product you'll inevitably will have to modify it (in order to have some other feature in future or correct some strange behaviour that you've not predicted) and that will be really difficult (if not impossible) if you've you're device full.
The best is to full almost 75% of resource of a device so you've not wasted resources and you've some space for future upgrade.