So, I rooted my device and everything was fine. It was like that until I used Freedom. It messed up my Play Store. There was nothing that could repair it. I tried doing a factory reset but my twrp did not let me do it, it said it cannot mount something. So, I thought that if I lock my OEM it will do a data wipe. So, I locked it, not my phone, when I want to load the system, it's stuck on the loading screen and when I try to boot in recovery it says "Your device is corrupt. It can't be trusted and will not boot".
Since you've installed TWRP, you cannot lock the bootloader. A locked bootloader will perform integrity check at boot time and if it finds anything tempered, it will refuse to boot:
The solution is simple: Unlock it again. You won't lose your data this time, so just proceed to connect your phone to a computer, boot into bootloader mode and run on the computer:
fastboot oem unlock
Exactly like when you did before rooting. This will make your phone boot up again.
Additionally, you may want to check for a newer version of TWRP and see if some bugs are fixed so you can do the data wipe.
For the problem of Freedom messing up Play Store, you can check out this answer.