"Bug" vs "insect": what's the difference?

What is similar?
Both "bug" and "insect" can refer to small arthropods. They are often used interchangeably in casual conversation to describe tiny creatures, although this usage may not always be scientifically accurate.
What is different?
"Insect" is a scientific term for a class of arthropods characterized by three-part bodies, six legs, and antennae. "Bug" can be a colloquial term for any small insect, but scientifically it refers specifically to the order Hemiptera, known as "true bugs". Additionally, "bug" has multiple meanings outside of entomology, such as a software error or a hidden listening device.
Which one is more common?

Examples of usage
Bug- I found a bug crawling on the kitchen counter.
- There’s a bug in the software causing it to crash.
- A bug bit me while I was walking in the park.
- I saw a beautiful insect with colorful wings in the garden.
- Insects are crucial for pollination in our ecosystems.
- The scientist studied the habits of a rare type of insect.