In a victory for President Carter, the Senate yesterday passed the president's bill to create a separate Department of Education. The vote was 72 to 21.

Floor amendments to curb sex education and the union shop in the nation's schools were crushed.

Carter, in a statement after passage, said, "This department will bring tighter management to more than 150 federal programs. It will eliminate bureaucratic duplication necessitated by the current organizational structure. It will cut red tape for states, local governments and others."

Under the Senate bill, the new department would have 17,000 employees and a budget of $14.3 billion a year.

It would include most of the education programs of the Department of Health, Education and Welfare - such as elementary and secondary school aid, college aid, vocational rehabilitation education for the handicapped, and library and museum services - as well as overseas Defense Department schools and some minor programs.

However, child nutrition, veterans education, the National Science Foundation, Head Start and aid to the arts and humanities wouldn't be included.

The department is Carter's major reorganization proposal this year. Attention will shift to the House later this week when the Government Operations Committee begins work on the bill. Carter, advised that the committee vote is tight, has invited some of the members to meet with him today.

Sen. Jesse Helms (R-N.C.) lost, 73 to 16, on an attempt to bar public schools from enrolling students in sex education courses without written consent from their parents. Helms alsp proposed that all parents be allowed to review materials used in the programs.He said a recent article in The Public Interest Magazine titled "Turning Children Into Sex Experts" suggests that sex education courses may forster sexual practices that many parents would object to.

Floor manager Abraham A. Ribicoff (D-Conn.) said that the Helms amendment, by ordering local schools to follow specified procedures in sex education courses, would intrude the federal government into local education practices and curricula. He said this "would open the door to federal dictation" about what local agencies may teach - the last thing in the word he had thought conservatives like Helms favor.

"This amendment specifically puts the federal government right into the curriculum content of the schools," said Ribicoff.

Sen. Roger Jepsen (R-Iowa) was beaten 68 to 24 on a proposal to bar the union shop in all federally aided schools. "A teacher should have the choice whether they should join or not join a union," he declared. But the amendment was ruled nongermane and the Senate upheld this ruling on the 68 to 24 vote.

Sens. Richard S. Schweiker (R-Pa.) and Daniel P. Moynihan (D-N.Y.) charged that setting up a separate department (with HEW to be renamed the Department of Health and Human Services) could lead to federal domination of education. Schweiker said people "fear federalization of education in this country."

However, Schweiker's proposal to kill the bill failed, 58 to 26. Ribicoff said that leaving education buried under layers of non-education officials in HEW would leave it suffering from "neglect, undue interference and rigidity."