I'm a fellow hiker and have a hard time finding friends who want to do outdoor activities these days. So I just hike alone usually because I want to do all the things I love with the time I have, and there won't always be people in my life I can share everything with. I also walk alone at night sometimes. Don't take my advice lol.
That being said, active communication can help. Having a dedicated check-in friend know where you are, what time you left, and what time you plan to return can be really helpful. If you're up for making an investment, Garmin has a neat line of devices called the inReach, which is a satellite communications device that allows off-grid two-way communication to others' phones, as well as SOS messaging, and you can also send a person a quick check-in notification by pressing a button. It's more of a backpacking tool but could definitely be used hiking too.