Yes social anxiety can be based on learned behavior. It can particularly happen slowly after experiencing an embarrassing or unpleasant social situation. However, other factors also play a role in development of social anxiety.