There was a bee on a flower close to me, but it suddenly tried to sting me.
この場合、次のような言い方ができますよ。
ーThere was a bee on a flower close to me, but it suddenly tried to sting me.
「近くの花にハチが止まっていたが、突然私のことを刺そうとしてきた」
suddenly で「突然」
to try to sting で「刺そうとする」
ご参考まで!