How to make /team related datapack

I wanted to make a datapack with custom commands to run commands from vannila "/team" feature:

So basically, the team command itself only available for server operators (not normal players). I want to change it by making custom commands to workaround (that can be run by the normal players). I also wants to make the people who made the team has a special "tags" or role to make them "team leader"

For example: /t create [teamname] // acts like /team create (leader only) /t join [team] // like /team join /t disband // acts like /team delete

I am new to the datapack, any help is appreciated!

Continue to help post