I used to run a mail server over 20 years ago. It's not that hard. Do a search on setting up your own SMTP server. Overview steps.
1. Get your own domain. example, let's say you registered arjun.com.
2. Set the MX record of arjun.com to point to your mail server's IP address. This can be done through your DNS provider or setup your own authoritative name server.
3. Follow online instructions how to setup. It comes built into many linux distributions.
One thing to note that it's a little harder nowadays because you lots of other mail servers may block you because they do not know who you are (otherwise anyone case setup mail server and spam people).