That is a fairly common way to learn, particularly as you are learning new techniques.
Personally, I have been programming computers for 35 years, so it has been a long time since I was starting from the beginning. But, for some new things, I too will lean on how existing apps approach some problem, until I either get more comfortable with the technology or abandon it.
For example, with Android Studio 4.0 and higher, you can write your Gradle instructions either in Groovy (
build.gradle) or in Kotlin (
build.gradle.kts). So, on a recent project, I tried following the approach used by an existing sample project using Kotlin Gradle scripts, in terms of how they organized those scripts. In that particular case, I concluded that I was not very happy with how it turned out, and I will look for other examples or experiment on my own going forward.
In the end, the objective is to write software that works today and hopefully works tomorrow. How you get there is an “implementation detail”, as it were. Some developers lean very heavily on existing code. Other developers are not. Neither approach is right or wrong, so long as people are happy with the results.
TL;DR: don’t worry, be happy.