We know that the bitcoin for mining a block is going to converge to approximately zero as the number of bitcoins will be almost constant after a certain amount of time. So, mining will no more profitable in the future and if no one is going to maintain the ledgers then how the bitcoin going to survive?
The fact that the reward to mine bitcoin will become less and less interesting over time especially in the long run is one of the major threat for bitcoin in the long run, there will be a point when there is gonna be almost no incentive to mine and so the hashing power might decrease rendering a 51% attack easier.
There is currently not a true solution but luckily bitcoin can be patch and there is lots of ideas on how to fix this threat.
This problem is called "tragedy of the commons" and here is a similar question from 7 years ago with lots of ideas , explanation and useful links: