I am currently learning about fundamental group and I understand that there is really a fundamental groupoid. Given a topological space $X$, it is a category with
- points in $X$ as objects
- paths between points as arrows
- homotopies between paths as 2-morphisms
You could continue by defining n-morphisms as homotopies between n-1 morphisms and this would give you something called an infinity category. My question is the following: If you were to stop at 2-morphisms would this give a bicategory like I suggested above? My concern is the following: usually in bicategories you have many types of 2-morphisms not all of them isomorphisms. However, in the fundamental groupoid, you seem to say that two paths are isomorphic if there is any homotopy between them at all. It seems like there are lot of missing 2- morphisms here.
It isn't a bicategory, but this doesn't have to do with $2$-cells being isomorphisms. (They're really equivalences and, in fact, the $1$-cells are also equivalences.) The reason it fails to be a bicategory is that composition of $2$-cells isn't strictly associative or unital: in fact, this is exactly the same problem that means that points-and-paths doesn't define a category.
It sounds like what you are trying to describe is the fundamental ∞-groupoid $\pi(X)$ of $X$, which has the structure of an ∞-category (in fact, a (∞,0)-category), rather than a bicategory. The $n$-cells are the "$n$-dimensional paths" in $X$, and the composition axioms hold only up to equivalence.
The fundamental groupoid $\pi_1(X)$ is then the $1$-truncation of $\pi(X)$, which quotients the $1$-cells (i.e. paths) by higher equivalence. The resulting structure is a groupoid, which is in turn a category.
The structure you (almost) describe is the $2$-truncation of $\pi(X)$, which is indeed a bicategory (in fact, it's a $2$-groupoid), except the $2$-cells are equivalence classes of homotopies, rather than homotopies themselves. This ensures that the rules governing composition of $2$-cells hold strictly.
More generally, the $n$-truncation $\pi_n(X)$ of $\pi(X)$ has points as 0-cells, paths as $1$-cells, homotopies as $2$-cells, homotopies of homotopies as 3-cells, and so on. When you get to the level of $n$-cells, you quotient by higher homotopy to ensure the composition laws for $n$-cells hold strictly; the obtained structure is an $n$-groupoid, a type of weak $n$-category, whatever that means.