This is a SIMPLE tutorial on how to use /bossbar
/bossbar add [name] [name that shows up] (to make it)
/bossbar set [minecraft:name] player [player] (to show it to someone (do yourself to show it to yourself)
/bossbar set [minecraft:name] max [number] (this will be the max number that the boss bar can be)
/bossbar set [minecraft:name] value [number] (this will be the number that will show up as a progress bar)
that's the basics of this command, hope you liked this tutorial!