Proof of $(0,1)$ is not compact with usual metric.
In the proof we say $\left\{\left(\frac1n,1\right):n\geq 1\right\}$ is an infinite cover with no finite subcover.
But, $(0,1)$ set also belongs to cover mentioned above. We can say $\{(0,1)\}$ is a subcover of mentioned above cover.
I am not able to understand what I am doing wrong.
$(0,1)$ is not in your open cover (for which integer $n$ is $0$ of the form $1/n$?). Therefore it can't be in a subcover.
To show that it has no finite subcover, take such a finite subcover. Being finite, it would have a maximum integer $n$ included, say $N$. But then the subcover is a subset of $$ \left( \frac{1}{N}, 1 \right), $$ since every other $1/n$ is larger than $1/N$. Hence you miss any point between $0$ and $1/N$.
(Alternatively, use that a subset of a metric space is compact iff sequentially compact, and consider the sequence $1/n$, which is clearly Cauchy, &c.)
Consider the open cover $C=\Big\{(\frac{1}{n},1):n\geq 2\Big\}$,. Since every $x\in (0,1)$ has $x>\frac{1}{n}$ for some $n$. But there is no finite subcover; if $x>0$, then $x\notin(\frac{1}{n},1)$ for all $n<\frac{1}{x}$. Thus no finite subcollection of $C$ can contain all $x\in (0,1)$.