I formatted your code with “```”, please do so next time, and also read Read before posting: How do I get my question answered?
Your code is super long and complex, yet you seem to have very basic questions (“how do I apply my BCs?”)
If I were you, I’d start from a much simpler case and learn the basics step by step. See The FEniCSx tutorial — FEniCSx tutorial for a possible tutorial.