I am muslim but I got a lot of questions about raising children with a woman or a man who doesn’t follow or who doesn’t have the same faith? For example a shia muslim who married a sunni woman, having children a shia man want to bring the chidren to his side, but she doesn’t want. What is going to happen in that case?

Such marriages are challenging as both husband and wife need to be understanding and have mutual respect before marriage regarding these sensitive issues.
Otherwise problems will arise.
If these conflicts do arise, there has to be an agreement with negotiation on exactly how to proceed.
This will involve some degree of compromise.