once you create a new SQL Server object, your newly created object does not get updated in the IntelliSence Local Cache and due to this, it shows red line underneath that object. So you just need to refresh SSMS IntelliSence Local Cache and once you refresh it, IntelliSence
will automatically add newly created object in the cache and the red line will disappear. try this
Edit -> IntelliSense -> Refresh Local Cache
or simply do
Ctrl + Shift + R