In your code the program is not looping. It is sitting there waiting for data. Once data arrives it will move on. Put a LED blinky after the SERIN and you will see what is going on.
Now then, I will suggest you use SERIN2. You have more options and when you end up using hardware serial the syntax is the same.
To see if data is coming in look at the SERIN2 section in the manual. You will find a way to wait for a given amount of time and a given character. If neither is present the code will then continue to the routine of your choosing.
Bookmarks