Well that’s the point of baptism. You’re right, the infant doesn’t know God and before baptism belongs to the prince of this world. That’s what baptism is for. And not just for infants - for adults who are baptized too.
And no, a sacrament isn’t effectual without faith. If you don’t believe, well that’s that.
If you’d like a more in depth introduction on the Lutheran view of baptism, I’d suggest this:
https://www.youtube.com/watch?v=iaKs3ygMBuo (part 1)
https://www.youtube.com/watch?v=yTIZrK6e-cY&t (part 2)
“And no, a sacrament isnt effectual without faith. If you dont believe, well thats that.”
If that is so, then you must believe Lutheran baptisms of children are ineffectual since babies have no faith.