There are two main reasons for this.
First, President Johnson got a great deal of support due to sympathy for President Kennedy. Once Kennedy was assassinated, he became a heroic figure in the eyes of many. This mean that there was much more pressure on Congress to approve his agenda as something of a memorial to him.
Second, President Johnson was a very skilled legislator. He had been in Congress for decades and had been a highly effective leader in the Senate. Johnson was famous for his skill at cajoling other members of Congress to vote as he wanted. He also, of course, had many contacts and personal relationships in Congress. Kennedy lacked all of these things and was therefore much less successful in pushing Congress to pass his agenda.
President Johnson was more successful in getting his ideas passed by Congress than President Kennedy was. There are reasons for this.
When John F. Kennedy ran for President, he didn’t campaign in support of other Democrats who were running for office. As a result, these elected officials didn’t feel they owed President Kennedy any favors because he hadn’t really helped them get elected or reelected. Plus, some of President Kennedy’s ideas were controversial. One example was the bill on civil rights being discussed.
Another factor in favor of President Johnson is that he had a long relationship with Congress. He understood very clearly how things worked in Congress. He was good at persuading people to do the things that he wanted to be done. President Johnson was able to call in favors because he had done things to help other elected officials. President Johnson also used the strong feelings some people had about President Kennedy to sway them to pass some laws that would honor President Kennedy’s legacy.
President Johnson was much more successful in getting his ideas through Congress than President Kennedy was in get his ideas through Congress.