My kitten keeps pooping on the floor!!

Cr

My kitten keeps pooping in the same corner instead of his litter box, he used to use his litter box alll the time and now recently he just stopped. I pacifically cleaned out his litter tray last night before I went to bed and there’s heaps of litter in there so he can bury it. And he used to do a poo after he eats in the morning but now it’s at night time while we are asleep. I think I may have scared him the first time he pooped on the floor with my yelling :/ lol it’s so frustrating 😡 what can I do for him to use the litter box again?