Olive oil is ok to cook with as long as you don’t heat it too hot so it reaches smoke point.
The smoke point is the characteristic temperature at which fat breaks down into visible gaseous products giving smoky blue fumes, is potentially dangerous and gives undesirable flavours, colour and odours. The higher the smoke point, the better the quality of fat for frying, preferably above 200ºC.
For olive oil, it depends what type of oil you use as different types have different smoke points. It varies from 180-200 degrees Celsius.
If you don’t heat olive oil to smoke point, then it’s ok to cook with, but you’ll need to take care. If you are going to be cooking with a high heat, then ricebran oil and avocado oil both have a high smoke point.
This list from the Healthy Food Guide website shows the smoke points of different oils and their fatty acid profiles.