Elliptic curves are used because points on the curve, together with an operation (elliptic curve point addition), form a cyclic Abelian group.
The curve is chosen such that this group will have a prime order. (There may be a cofactor, in which case only a subset of points on the curve will be members of the prime-order group).
Because the group is cyclic and the group order is prime, all points in the group (other than the identity element, which on some curves is the "point at infinity") can be used as generators of all other points in the group.
There is nothing special about the well-known and widely used generator point $G$. It is not something that is derived - it is something that is arbitrarily chosen, ideally using a "nothing up my sleeve" approach. In the case of secp256k1, it is not fully known how the well-known generator point $G$ was arbitrarily chosen.
The bottom line is that $G$ is not a special point with special mathematical properties, and so you can't derive it using knowledge of properties of the curve. It is a point that is arbitrarily chosen as part of a particular protocol, and you simply need to hard-code the value such that it is the same point that other protocol participants are using.