Even though PC/Mobile crossplay isn't officially supported, there is a TShock plugin that you can use to enable crossplay on your Terraria server. Let's go over the whole process!
1. Get a TShock server up and running
TShock is an open source Terraria server management tool that's completely free! You can go ahead and download it from their Github page.

Once you have it downloaded, run TShock.Installer.exe, and the necessary files will be automatically downloaded. This includes TShock libraries and .NET Runtime 6.0.

You'll be greeted with this prompt, where you can create (or load) a Terraria world. Go through selecting world size, difficulty and all that stuff.
Once the world is generated, you can close the server window, since we'll need to install the Crossplay plugin.
2. Installing the Crossplay plugin
You can download the plugin from the official Github repository:
Then, drop the Crossplay.dll file into the ServerPlugins folder.

You'll also have to disable a few settings in the server config, since all TShock servers come with some annoying restrictions.
Open the config.json file in the tshock folder and set SpawnProtection
to false
and ProjectileThreshold
to any big number like 999999
. You can also edit other settings if you'd like.
Once that's done, launch TShock.Installer.exe and start the server!

Once you got your server up, you can connect to the server from localhost:7777 on your PC.
3. Allowing mobile players to join
For the mobile players to join, you'll either have to port forward or if you're playing on the same Wi-Fi network (or LAN), you can instead connect locally.
To do this, open cmd
and type ipconfig/all
and scroll down to the network adapter you're currently using (either Wi-Fi or Ethernet).

Your mobile friends can join from the IPv4 Address + port 7777.
If your friends can't join like this and you can't port forward for them, you can look into alternatives like ZeroTier (for PC) and ZeroTier One (for mobile).