I heard it on a history matters video and I wanted to know why
First let me say that I am not a professional historian, just someone with a strong interest in Middle Eastern politics. Most of what I say will be from the book 'Arab Nationalism in the Twentieth Centrury' by Adeed Dawisha.
Pan-Arabism is often used interchangeably with Arab nationalism, which is clearly a political movement centred around a unified Arab state. This is in contrast with Arabism, which is more of a cultural identity based around the common language and shared cultural elements and, while related to Arab Nationalism, can be seen as a non-political ideology. So by Pan-Arabism I will mean the political, rather than cultural, movement. While much of the Arab world is connected through Arabism, there were many countries that were either opposed, or not keen on, Pan-Arabism. A few key reasons for this were the demographic make-ups of individual countries, political opposition to what was seen as a left-wing movement, personal opposition to Nasir, being geographically too distant from the centre of the Arab world, stronger regional and tribal identities and a fear that being part of a unified Arab state would minimise religious freedoms.
For Lebanon in particular, the first and last are quite strong factors. Unlike, for example Syria, Lebanon had a large portion of its population being Christians. This Christian community had traditionally been politically dominant - the President, for example, was required to be Christian - and at the end of the Ottoman Empire and under the French mandate Christians had been a protected group in the region. In fact, the country was basically run on religious lines, with Christians and Muslims having a high degree of autonomy, although the government and President were still obviously powerful. The obvious threats from Arab nationalism, namely the loss of their political power, as well as their own identity as Christians under the 'Pan-Arab' banner, were significant in the distrust of the movement by the Lebanese Christians. However, the Muslim population of Lebanon was by no means hostile towards Arab-Nationalism - at the formation of the UAR there was great joy among many of that demographic, and presumably hope that at some point Lebanon would be incorporated into the state. Note that post-1948 south Lebanon was heavily populated with Palestinian refugees, who were considerably aligned with both Nasir and the Pan-Arab movement due to their positions against Israel. This religious divide was sufficient to start a crisis/civil war in 1958, in which Arab nationalist factions backed by Nasir attempted to overthrow the President Camille Chamoun and get Lebanon to join the UAR. Chamoun, and the Christian political bloc, was very western aligned, allied with the USA and not socialist (in a way that one could call Ba'athism or Nasirism socialist). In fact the Sunni prime minister at the time was an active Nasirist and was very supportive of Lebanon joining the UAR. However, the 1958 crisis was resolved with a new Christian president who was less sectarian and had popular muslim support. This combined with a strong USA military presence put a damper on Lebanese muslim's plans to join the UAR. So it is not quite as simple as saying that Lebanon wasn't keen on Pan-Arabism, more that the complex political situation in Lebanon meant that it was harder for the Arab-nationalist factions to make an impact.
It is worth noting that in other countries, such as Syria, there were many Christians who were active supporters of Arab nationalism. Possibly the most significant was Michel Aflaq who was a powerful force in the rise and direction of Ba'athism, of which Arab Nationalism was a central tenet. However, the disintegration of the UAR and the failure of Iraq to join the UAR show that even with close political alignment, practical Arab Nationalism was not especially easy. Since the dominant power of the Arab world at that point was Egypt, which is also still the most populous Arab nation, any Arab nation would need to be based around Egypt. Therefore countries joining an Arab nation would, in some ways, be subservient to Egypt. This was the case with Syria in the UAR, and the Syrians were very far from happy with it, especially since Syria joining the UAR was far from a consensus - the Syrian cabinet was essentially forced onto a plane to Cairo by the Pan-Arab aligned military. Even the Ba'athists were unhappy with the arrangement, because they went from being politically significant in independent Syria to being powerless in the UAR, in which political parties were banned. The Ba'athist vs Nasirist battle continued and prevented the second formation of the UAR. Malcolm Kerr's 'The Arab Cold War' looks at this in detail. Iraq also had a leader who politically close to Nasir in President Abdel Qasim who was a left wing revolutionist. However, he was more aligned with Communism and the Kurds, and pursued a more 'Iraq first' policy. Obviously this was very objectionable to Nasir, but he was less effective in creating political pressure on Qasim, because Qasim was a revolutionary and was popular with Iraqis. He was, in many ways, an anti-Nasir. So political closeness rarely caused promotion of Pan-Arab goals. Lebanon's leaders were politically opposed to communism, Ba'athism and Nasirism - the Christian leadership was centre-right and particularly close with the USA, whose soldiers saved Chamoun and his government in the civil war.
The socialist ideals of Pan-Arabism were also very off-putting to politically conservative rulers near Egypt, such as the Kings of Jordan and Saudi Arabia. Jordan was the main target of Nasir's ire, and on some occasions only external intervention probably put off coups or revolutions in Jordan by pro-Nasir forces, which would then have led to it joining the UAR (or merging with Egypt in another capacity). As I mention, there were other factors why many other nations didn't take strongly to Pan-Arabism and these are better explored in Dawisha's book.
One thing that is also worth mentioning is that it is possible to argue there was not really a very strong foundation or will for practical Arab-nationalism at all. Behind all the rhetoric, Egypt had its own national identity with many Egyptians feeling 'Egyptian' and belonging to a tradition that stretched back to the pharaohs, rather than 'Arab'. This was shared elsewhere, such as in Iraq which had its own identity going back to the Babylonians. These traditions meant that it was difficult to completely identify politically with an Arab who lived thousands of miles away. Even Nasir originally viewed Egyptians as unique and exceptional, and setting them apart from other arabs. It was arguably only pragmatic political aims, rather than a strong Arab identity, that moved him to minimising this 'Egyptianism'.