As far as I know atheltes or prefessional players are not allowed to bet on themselves[1]. But as the reference stated, it is somehow in a grey area where some players are able to bet on themselves. According to the regulation, although players are banned on betting on the sports they are involve with, they can bet on other sports that they don't have any affiliation.
Although it was that althletes are ban from betting on themselves, several boxers and MM artist are able to do so why? Because there are few exception on the rule[2][3]
So, in general, athletes are not allowed to bet on themselves. There are a few exceptions to these rules, especially when athletes find grey areas in the legislation and regulation processes. This is only valid for individual matches and sports, like boxing, MMA, or tennis
[1]
https://medium.com/bitcoin-news-today-gambling-news/can-a-professional-athlete-bet-on-themselves-593223b597c3[2]
https://shortboxing.com/why-boxers-can-bet-on-themselves-but-not-against-themselves/[3]
https://www.fightmatrix.com/2022/11/28/ufc-fighters-and-betting-can-they-bet-on-themselves/