That "Initial Size" label is misleading. It's really the "current size" of the file. Also, changing that number and clicking "OK" does a SHRINKFILE
behind the scenes, so the two things you're comparing are actually...the same thing 😀
Here's my copy of the StackOverflow2010 database (where the current size really is 9,105 MB):
If I change that to "5":
And then click the "Script" button in the top left of the window, this is what SSMS generates:
USE [StackOverflow2010]
GO
DBCC SHRINKFILE (N'StackOverflow2010' , 5)
GO
So the answer to your question is that these two features of SSMS do the same thing.
By the way, I highly recommend using that "Script" button in SSMS frequently as you are learning. It's a great way to understand what the SSMS GUI is doing, and is also helpful in automating and overcoming the limitations of the user interface as you get more comfortable with T-SQL scripts.
Note that you should be wary of shrinking database files, see here for more information:
I Need to Shrink My Database - I just freed a lot of space
When is it OK to shrink a Database?