Is it possible to inscribe a regular hexagonal pyramid inside a sphere, so that all corners are touching the pyramid? Since the height of the pyramid is'nt necessarily the same as the lenght of the edge, I can't figure out if it is even possible.
Here is a picture of the solution I want, but made with a tetragonal pyramid:

Yes, it is possible. I will give you the general statement, so you would know when any pyramid, not just a regular one, is inscribed in a sphere.
Statement. Let $AB_1B_2...B_n$ be a pyramid (not necessarily regular) with apex $A$ and base planar polygon $B_1B_2...B_n$, where in your case $n=6$. The pyramid $AB_1B_2...B_n$ can be inscribed in a sphere if and only if the base polygon $B_1B_2...B_n$ can be inscribed in a circle.
Proof. Assume that $B_1B_2...B_n$ can be inscribed in a circle, i.e. there exists a circle with center $O'$ such that all vertices $B_1, B_2, ..., B_n$ lie on the circle. Let $l$ be the line through the center point $O'$ and orthogonal to the plane determined by the base polygon $B_1B_2...B_n$.
Denote by $M$ the midpoint of the edge $AB_1$ and let $p$ be the plane through $M$ and orthogonal to $AB_1$, i.e. this is the plane of all orthogonal bisector lines of segment $AB_1$.
Denote by $O$ the unique intersection point of the plane $p$ with the line $l$. Then $OA = OB_1$ because triangles $AMO$ and $B_1MO$ are congruent. Indeed, $MO$ is a common segment, $AM = B_1M$ because $M$ is a midpoint of $AB_1$ and $\angle \, AMO = \angle \, B_1MO = 90^{\circ}$ because plane $p$, containing $MO$, is orthogonal to $AB_1$.
Furthermore, for $O$ on $l$ the distances $OB_1=OB_2= ... =OB_n$ because any pair of triangles $OO'B_1$ and $OO'B_k$ are congruent for all $k=2,...,n$. Indeed, $OO'$ is a common edge, $O'B_1 = O'B_k$ as radii of the circle circumscribed around $B_1B_2...B_n$ with center $O'$, and $\angle \, OO'B_1 = \angle \, OO'B_k = 90^{\circ}$ because $OO' = l$ is orthogonal to the plane of the base polygon.
Consequently, $OA = OB_1 = OB_2 = ... = OB_n $ which means that the points $A, B_1, B_2, ... , B_n$ are equidistant from the common point $O$, which means they all lie on the sphere centered at $O$ and of radius $OA$.
The converse statement is trivial, if the pyramid $AB_1B_2...B_n$ is inscribed in a sphere, the planar polygon $B_1B_2...B_n$ determines a plane which intersects the sphere in a circle and all of the vertices of $B_1B_2...B_n$ lie simultaneously on the plane and on the sphere, so they lie on a common circle.