If you're a US taxpayer, then those public schools are there in some small part because of you. They are a small army of individuals who were trained just for teaching and educating children. Go investigate and see if you have a good local school and a good school district. If it's "ok" but could be better, then figure out how to get involved. Get elected to the local school board. (It'll be a real eye-opener, and a big commitment, since usually it's an unpaid, elected position.) Make your local public schools better for not just your children but everyone's children.
And if you don't want to go quite that far, but do discover that the local public schools are above state average, then be an involved parent. Studies do show that students whose parents are actively engaged with them and their school are higher achievers. We're not talking about "helicopter parents" but ones who give guidance, set a high bar for their child, help them expect good things from themselves and help them cope and correct course when things don't go as well as they wanted.
As parents, you're always teaching your children, even if you don't mean to be. Your actions are some of the most powerful teaching tools you have, for good or for bad. While your child is young, go look at your local schools, talk to the local home schooling groups, check them out, grade them yourself, check their backgrounds, look at their track records. Good groups, home or public, should be quick to help you find their positive achievements. You need to mine your own data, in your local area. People here, we may have good intentions, but what we think is important in education, may be completely different from what you have where you live.
Good public schools are working to hit their stride, raise levels of achievement, and change the life-long trajectory of as many students as they can. Do they have a drop out rate below, or significantly below the state average? That's typically a tell-tale sign. Do they have their own alternative high-school? If they do, then that typically means they take drop-outs very seriously, and aren't willing to let them go without a fight. How much of their Special Education do they do in-house? If they're working to keep more kids with high needs inside their system instead of just taking the easy way and farming them out to special schools, making that a last resort, then they truly take educating every child, every day...seriously. It's not just their career, it's their passion. You want people of passion educating our children. They care about the outcome of every child who walks in the door, personally. It's their mission to get them to succeed.
If you don't find that at your local public school...then that's the sort of person you need to be when homeschooling. It needs not not just be your career to school your child, it needs to be something you jump out of bed, excited to start the day, type of passion. If you don't have that at the public school, and you don't have it at home, it's time to find a private school that will meet that need.
Public education has been a family business for my entire life. I'm the black sheep, I went into IT. My siblings are teachers, and my father is a retired educator and school administrator. I've watched our local schools very closely for well over a decade, after my father retired. Good schools attract great teachers...rock star teachers, because they all share a passion for changing the life trajectory of a student. Whatever school you decide to put your child in, make sure it has that sort of staff in it.
There are very good public schools, and poor ones. There are great homeschoolers, and ones that are overwhelmed. You're going to have to look at your local options, and make the best decision you can. And remember: If things don't go according to plan, change the plan. Set a good example and help your child make good decisions.