The easiest way to validate your text columns against a variable would be to attempt to convert the date string to a date.
Declare @stringDate varchar(20) = '2020/01';
Select try_cast(concat(replace(@stringDate, '/', ''), '01') As date)
The other option is to convert your @date to a string and compare:
Select replace(convert(char(7), @stringDate, 121), '-', '/')
As for getting the end of month - another option:
Select dateadd(month, datediff(month, -1, getdate()) - 1, -1) -- end of previous month
, dateadd(month, datediff(month, -1, getdate()) + 0, -1) -- end of current month
, dateadd(month, datediff(month, -1, getdate()) + 1, -1); -- end of next month
For variable declaration - I prefer using EOMONTH as it is simpler code, and which one to use in a query depends on the expected output. If using to compare against a datetime column - use the calculation above and if used in a comparison with a date data type use EOMONTH.
If you are converting a column to the end of month then choose the version that returns the correct data type. For datetime2 or datetimeoffset - which require explicit or implicit cast/convert in either method - much easier to use EOMONTH with an explicit cast/convert. Ex: cast(eomonth(sysdatetime(), -1) as datetime2).
For the first of the month...the standard formula works for any variable assignment...but using EOMONTH is just as easy: SELECT dateadd(day, 1, eomonth(getdate(), -1). The same issues apply - if using in a query use the version that returns the appropriate data type or use an explicit cast/convert (which is also required for datetime2 or datetimeoffset).