The outer box will always show as a gap. Once all other errors have been fixed, reassess the topology and verify this is the only remaining error in the error inspector. If the outer box is the only area, then dismiss it and continue with your process.
I recommend always making sure that you have consistent indentation and line breaking of your code, as this makes it easier to see which lines belong to which functions. This helps you (because you can learn to recognize and write correct patterns) and people you're asking for help (because standard formatting is easier for them to understand quickly).
Issue is produced because you don't have a time series. You only have an image (bare) without 'system:time_start'. I introduced an arbitrary 'system:time_start' (ee.Date('2014-09-01')) in that image (code) and it can be corroborated there is no series for producing an useful chart (see following image).
So, you need a time series from your Image Collection ...
Error pops up because img_last images doesn't have a 'system:time_start'. You can corroborate that commenting set method as in following snippet code. However, another issue appears because you are trying to map an empty HS_SSTA_7d ImageCollection. So, I also commented printing DHW_HS.
var SSTA_7d = ee.ImageCollection.fromImages(
Your issue is in this line:
var enddate = ee.Date.fromYMD(endyear + 1 , 1 , 1);
because endyear is an ee.Number if you don't use .getInfo() you can not call +1 on it. Instead you need to use the Earth Engine specific functions:
var enddate = ee.Date.fromYMD(endyear.add(1) , 1 , 1);
If you do this, you can just remove the .getInfo() calls.