If God wasn’t in favor of marriage, then he would have made Mary a single mom.
The only way you could put marriage ahead of God would be if you willfully chose to commit sin because marriage itself, your spouse, or the person you wanted for a spouse caused you to sin. Like if a woman said, “I’m not marrying a Catholic, I’ll marry you only if you quit all this churchgoing and praying stuff”, and you said okay just because you wanted to marry her so badly, or if your wife wanted you to embezzle money or use drugs with her and you said okay because you were worried she’d leave you, then you’d be putting marriage ahead of God.
Otherwise if you’re just trying to do your best as a spouse, it’s not a problem. I’ve heard more than one priest say that loving your spouse is a way of loving God.