Obviously there is some acceptable line here, but I think the States handles this decently well enough. In Austin where I live you can get what is called a “homeowners permit” in a lot of cases. Meaning the city will come look at your work and as long as it’s up to code you get a legal permit just like a contractor would get (https://www.austintexas.gov/page/homeowners-permit). You can only do this to your own home so it’s not a shortcut to running a chuck in a truck business without a license.