Sorbic acid is a naturally occurring compound that is widely recognized for its antimicrobial properties and…