Comets in the Oort cloud evolve under the influence of internal and external perturbations, such as giant planets, stellar passages, and the Galactic gravitational tidal field. We aim to study the dynamical evolution of the comets in the Oort cloud, accounting for the perturbation of the Galactic tidal field and passing stars. We base our study on three main approaches; analytic, observational, and numerical. We first construct an analytical model of stellar encounters. We find that individual perturbations do not modify the dynamics of the comets in the cloud unless very close (<0.5 pc) encounters occur. Using proper motions, parallaxes, and radial velocities from Gaia DR2 and combining them with the radial velocities from other surveys, we then construct an astrometric catalogue of the 14 659 stars that are within 50 pc of the Sun. For all these stars we calculate the time and distance of closest approach to the Sun. We find that the cumulative effect of relatively distant (≤1 pc) passing stars can perturb the comets in the Oort cloud. Finally, we study the dynamical evolution of the comets in the Oort cloud under the influence of multiple stellar encounters from stars that pass within 2.5 pc of the Sun and the Galactic tidal field over ±10 Myr. We use the Astrophysical Multipurpose Software Environment (AMUSE), and the GPU-accelerated direct N-body code ABIE. We considered two models for the Oort cloud, compact (a ≤ 0.25 pc) and extended (a ≤ 0.5 pc). We find that the cumulative effect of stellar encounters is the major perturber of the Oort cloud for a compact configuration while for the extended configuration the Galactic tidal field is the major perturber. In both cases the cumulative effect of distant stellar encounters together with the Galactic tidal field raises the semi-major axis of 1.1% of the comets at the edge of the Oort cloud up to interstellar regions (a > 0.5 pc) over the 20 Myr period considered. This leads to the creation of transitional interstellar comets (TICs), which might become interstellar objects due to external perturbations. This raises the question of the formation, evolution, and current status of the Oort cloud as well as the existence of a "cloud" of objects in the interstellar space that might overlap with our Oort cloud, when considering that other planetary systems should undergo similar processes leading to the ejection of comets.