Health Overlay is a client side mod that replaces the default heart renderer which always added more rows when the player had more than 20 health. The health is now in the same row but just displays different colored hearts, it also does the same with absorption. There is a config file located in the config folder where you can configure the RGB values of hearts and remove/add as much as you like.
Fabric version available here.
This mod was made to work together with Stats Keeper, but can be standalone.