I am trying to solve an exercise that asks for a non-effective holomorphic line bundle $L$ of degree 0 such that $L \otimes L$ is effective.
I think I have mostly solved it but since I am a bit shaky on the details and would appreciate if someone could see if my approach is valid.
We know that every line bundle has a meromorphic section thus we can find a divisor $D$ such that $L$ is nothing but the line bundle $[D]$ obtained by the map $[\cdot]: Div(X) \to Pic(X)$. Hence in terms of divisors we want to find some $D \in Div(X)$ of degree 0 such that $h^0(X, D) = 0$ and $h^0(X, 2D) = 1$, by an application of Riemann-Roch this is equivalent to $2D \sim 0$ and $D \nsim 0$.
If we have any hope of finding something like this we should look for it in some surface $X$ with non-zero genus.
According to this top answer the Picard group of the torus has several $2$-torsion elements that should do the trick, however, I have not been able to define the line bundle explicitly.
From your post, it seems like you're working on curves over $\Bbb C$, but everything I'm about to say will work over any algebraically closed field.
Let $X$ be an elliptic curve with identity point $P_0$, and let $P_1$ be a nontrivial $2$-torsion point. Then $\mathcal{O}_X(P_1-P_0)$ is degree $0$ and not the trivial bundle: if it were, $P_1$ and $P_0$ would be linearly equivalent divisors, but two distinct points are linearly equivalent only on a curve of genus $0$. On the other hand, $\mathcal{O}_X(P_1-P_0)^{\otimes 2} \cong \mathcal{O}_X(2P_1-2P_0)\cong\mathcal{O}_X$, which is principal.
Here are two ways to see that this divisor is principal, depending on how much background with elliptic curves you have: