Is it ok to cook with herbs like lavendar?

Yes. Yes people been cooking with lavander for centuries. Perhaps you've had it in chocolates or cookies or cakes. But there are some varieties that don't taste as good.