Each SharePoint Online Document Library supports the ability to have versioning enabled. Once enabled this automatically creates a new version of each document in that library every time a document is edited. This is really handy if you potentially need to recover a previous version of the document. Also using the ability to enable minor or draft versions of a document you can also control who can view any drafts.
This video will give you an introduction to versioning in SharePoint Online Document Libraries. You’ll see how to enable it as well as how to configure the different options. You’ll also see how versioning works between two users with different rights to the document.
You can find further information on SharePoint Online versioning here: