This article explains the difference between @replies and direct messages on X, and describes how to send them. This information applies to the mobile X app and the web browser version of X.
How to Send a Direct Message on Twitter – Complete Guide
If you want to publicly reply to someone on X, use @reply at the beginning of your tweet. You should also know how to private message X if you don't want everyone to see your conversation.
On X, @reply is a way to respond to something a specific person has posted. A typical @reply would look like this: @username message. For example, if you were sending a message to @linroeder, your @reply would look like this:
When someone replies to one of your posts with @reply, the tweet will appear on your profile page under Tweets & Replies.