The use of rhetorical questions in the bolded lines helps to advance Kennedy's appeal for the American people to unite under a new president by engaging the audience and prompting them to reflect on their role in shaping the future. By asking if a grand global alliance can be forged and if the audience will join in the effort, Kennedy is encouraging the people to see themselves as active participants in bringing about positive change. The questions also create a sense of urgency and importance, emphasizing the need for unity and collective action in defending freedom.
I hope this helps you. :)