The fact that you're asking this question shows that you have the right mentality going into this - be open to the discussion, because that's what it is; there's no straight answer here. It's absolutely something you're going to have to continue to discuss and consider deeply.
The fact is that in today's global society, cultural appropriation is very hard to avoid. Moreover, it's hard to feel like a fully rounded person without reaching to other cultures for enrichment. The important thing is be very careful and to treat anything you appropriate as a valuable opportunity to learn about deine Mitmenschen, your fellow human beings (your "with-humans"). And it's extremely important to keep respect for the underrepresented at the forefront of our minds. Accuracy, respect, and humility are the most important things to have going into this.
Some people will disagree with me - the fact is, sometimes even humble, accurate, and respectful appropriation can be harmful. Let's discuss that.
Every white musician who appropriates Black American language, hair, clothing, and mannerisms, is subscribing to a pop culture that contributes to their image and sometimes success. This arguably takes up space that could be occupied by Black musicians who are doing the same work and have more cultural claim to that image. A more classic example of this is the American Indian symbols that have become so popular in the US like feathers, dreamcatchers, and sometimes even totems. A white person going to a white tattoo artist and paying them for such a symbol, especially a celebrity for whom these tattoos form part of an image - they are exploiting and profiting off of a community that has been irreparably wronged by our government, society, and culture. No amount of humility, accuracy, and respect can make up for that.
Keep these things in mind. It can be uncomfortable to think about cultural appropriation, but you've got a great mindset already, seeking education and discussion about it. Don't let these answers, which may sound kind of negative, make you feel lectured at or personally attacked - even if you know you've made mistakes before or notice you do in the future, embrace those as learning opportunities, lean into them and analyze them with a critical mind. The mindset is the most important thing here.
When you find yourself in a situation where you feel you may be appropriating another culture,
(1) ask yourself, "Am I taking up space that should be occupied by a minority or underrepresented person?" Space in this context could refer to economic or social status.
(2) put yourself in a humble mindset - your job is not to criticize or critique the other culture, but rather to appreciate it from a new perspective.
(3) research the aspect of the foreign culture carefully, ideally respectfully seeking the input of a member of that culture and even building a friendship.
(4) use the information you learned with respect and pass it along as accurately as possible, possibly even acknowledging if it's not obvious that you are not a member of that culture or heritage and that this was an intellectual pursuit for cultural enrichment for you.