If I M Going To Sell My Xyz Stock That I Bought For 1 But Now Has A Value To 100

If I’m going to sell my XYZ stock that I bought for $1 but now has a value to $1000, will I get taxed if I used my earnings to buy ABC stock?