In killiefish and others swimming like your fish is is the inability to inflate and deflate their swim bladder and they are referred to as "belly sliders". In young fish it is often a result of poor water quality during their development. ANd it is possible that your fish was always this way for lots of belly sliders do live a long time. But belly sliders ususally are not able to get as much food as their brothers and sisters, so they are normally also undersized. Since yours is full grown, it probably got a bacterial infection in its swim bladder which has cause it to not function. Could also be a result of a virus.
https://modestfish.com/fish-disease-guide/. the section in this website suggest many different causes of loss of swim bladder problems including fighting and being dropped.