Often it is easier to not start from scratch but alter or extend what you have imported.
Example/tutorial projects are typically locked.
A locked project means:
Typically, libraries are imported as a zip file. So, the blocks in the libraries are read-only. This means you cannot modify them. If you need some modification on a block, you need to make your own copy of the block.
Work in your own project. You need to create a new project as explained here. Choose Application Project, Java SE as the project setup.
Duplicate the block you are going to use into your project. Right-click the block, for example Selfie Basic, and choose Duplicate
Now you own a copy of the block you have imported and are free to alter and extend it.