How to detect if bossbar gets to a certain %

hello, with datapacks is there a way to know if a boss hp gets to a certain value and with that execute a funcion to make it harder

Continue to help post