Yes, you can edit theme files directly in WordPress by going to Appearance > Theme File Editor in your dashboard. However, be cautious—even a small coding mistake can break your site, so it’s important to back up your site before making any changes.
For safer customization, it's highly recommended to use a child theme. A child theme allows you to make changes without modifying the original (parent) theme files, and it ensures your customizations are preserved during theme updates.