I am trying to make a competitive team for double battles and I need a prankster sableye for it but I don't know where to get one whith his hidden ability.please tell me how and/where.
The only way is through Max Raid Battles. Sometimes (small chance) the Pokemon in a den might have its hidden ability. You can check Serebii to see which Pokemon are available in which den and which ones have a chance of having their hidden ability.
You can look at each den and what is available in it here: https://www.serebii.net/swordshield/maxraidbattles/den1.shtml