UART (Universal Asynchronous Receiver/Transmitter) is very important for serial communication. The Arduino Uno offers a UART port, providing two options: using the Arduino serial library or diving into the atmega328/P microcontroller registers. Exploring the second method will allow you to handle UART communication accurately, also this code you can port this code on Atmel/Microchip studio.
Keep Learning.
I moved your topic to an appropriate forum category @rizwan1992.
In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.