Is it permissible to be a lawyer while living in the west? I’m asking because Islam has sharia law and that’s the law of Allah (swt) while non-Muslim countries have their own law that doesn’t align with Sharia

It is permissible as long as the person is guaranteed he won’t side with the unjust ones, he won’t advocate for any falsehood, and he won’t defend anything that violates Islamic principles.