Don’t take things out of context. Literally the verse before says:
“Now as a concession, not a command, I say this.” 1 Corinthians 7:6
And also the context is that a single person can devote themselves fully to the work of God. So you can only apply verse 7 to faithful Christian’s who see that as a single person they can fully devote themselves to ministry without having to care for a family.
Very few are called to do that it seems.