My spouse has passed away. He owned the apartment where we were living at the time of his death, which he bought before our marriage. I have a ¼ share of his estate. I want to become the owner, but his children do not agree. Can they prevent it?

No. The surviving spouse who co-owns the deceased's property can request the preferential allocation of the main residence if it was already their home at the time of death (Article 831-2, 1° Civil Code).
If requested, this allocation is automatic and binding on the other co-owners (Article 831-3 Civil Code).