From Magento 2.3, Core modules use the declarative schema approach rather than setup upgrade scripts. This is the new recommended approach for Magento versions 2.3 and upper version.
All the InstallData and UpgrageData will be replaced by Data Patch Versioning.
Now you have to create Setup/Patch/Data folder and create the class file for create/update attribute or add sample data in Magento.

Hi Rakesh,
Very nice article on declarative data patch.
Would you mind to share some thoughts on a question I have, once I created a class app/code/Rbj/CmsBlock/Setup/Patch/Data/AddNewCmsStaticBlock.php to add 1-2 static blocks initially, later I have a need to add 2-3 more static blocks than do I have to create a new class file app/code/Rbj/CmsBlock/Setup/Patch/Data/AddNewCmsStaticBlock_[timestamp].php with its apply() and getVersion() method or do I will have to update the changes in the same class file app/code/Rbj/CmsBlock/Setup/Patch/Data/AddNewCmsStaticBlock.php updating the content of the apply() method and updating the version in the getVersion() method?
Great article! Thank you very much 🙂
There is some notices about phpDoc:
It need to be changed to @var BlockFactory
I think here is wrong description
https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#documentation-space
https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#inheritdoc
Also,
PatchVersionInterfaceis deprecaredFor Block save you need to use MagentoCmsModelBlockRepository
@serzhichek:disqus Thanks for your update. I have update it to BlockFactory.