If he was checking you out the two times that you both walked past each other, there may have been something about your physicality that appealed to him.
Yes, it may be why he gave you a compliment.
However, receiving a single compliment doesn’t automatically indicate that a guy is interested in you romantically.
When he told you to stay off your phone, he was most likely just looking to get your attention. It doesn’t necessarily mean that he didn’t want you to be on the phone with anyone else but him.
Being that he has been bold enough to tell you to stay off your phone, he doesn’t appear to be shy around you.
Perhaps he avoids looking at you or talking to you because he isn’t quite sure about what to make of you.
He may not know whether you are someone that he can engage with wholeheartedly at work. It may be because he senses something about your body language that may not be particularly inviting.
You did state that you have gotten really shy around him and avoided looking at him in the past. This could be a body language factor that he is taking into account and as a result, he may be mirroring your behavior.
It is unlikely that you are both feeling a tension or attraction towards each other. You may be feeling it on your end, but he hasn’t shown any strong signs that he is having the same experience.
It’s unlikely that he is a little intimidated by you. Again, he has boldly told you to stay off your phone in the past.
It may have seemed that he got very nervous and quiet when you arrived in the work area as he was joking with his friend.
However, it may have simply been a feeling of discomfort being that he doesn’t really know you and may have been worried that you heard something that you shouldn’t have.