College is a very valuable experience and well worth the investment in both time and money. As you consider your choices, there are many factors that come into play. These can include: Grades and SAT/ACT Scores (used for college admissions/scholarships), financial situation, current and future cultures, family circumstance, etc.
A community college can, although not always, provide a student with the opportunity for a lower cost path for some of the required courses needed for a degree. This is due to a lower per credit hour fee and, depending on location, ability to live at home. Additionally, if in your local community, it may have shared values and cultural aspects for which you are familiar. Some of the benefits need to be validated, especially if you plan to transfer later to a four year program. This includes ensuring the classes are accredited, meet the requirements of your degree, can be transferred in full to your new institution, and adequately prepare you for your next college's level of education.
A community college can also provide the benefit of getting one used to self-management and scheduling for university life. It introduces a student to a different way of life than high school, including schedules, diverse people, financial requirements and work/activities.
If you decide to go to a community college first and then transfer, make sure to review a few other potential impacts. Are you passing up a scholarship/financial aid at the four year institution that may not be available to a transfer, but only to an incoming freshman? What are the transfer rules regarding timing, course work, admissions? How many hours must be completed at the four year institution to earn a degree?
For more information, I recommend doing a search for articles as well. Here is one that also captures some of what I shared from my personal experiences. https://www.scholarships.com/resources/college-prep/choosing-the-right-school/the-pros-and-cons-of-community-colleges/