welcome to dba.stackexchange. It might help to paste your (unsuccesful) queries and the errors you got.
I am sorry other tipps and tutorials did not help you with your challenge. Since you are specifically asking for pivot, I suggest another documentation that appears (to me) to be quite straight forward:
https://learn.microsoft.com/en-us/sql/t-sql/queries/from-using-pivot-and-unpivot?view=sql-server-ver15
The basic pivot form looks like this:
SELECT <non-pivoted column>,
[first pivoted column] AS <column name>,
[second pivoted column] AS <column name>,
...
[last pivoted column] AS <column name>
FROM
(<SELECT query that produces the data>)
AS <alias for the source query>
PIVOT
(
<aggregation function>(<column being aggregated>)
FOR
[<column that contains the values that will become column headers>]
IN ( [first pivoted column], [second pivoted column],
... [last pivoted column])
) AS <alias for the pivot table>
<optional ORDER BY clause>;
In your case that might turn out to something along those lines (I did not test this and have not finished it all):
SELECT TimesOfDay,
[1] AS Monday,
[2] AS Tuesday,
...
[last pivoted column] AS <column name>
FROM
(<SELECT query that produces the data>)
AS <alias for the source query>
PIVOT
(
sum(item_count)
FOR
[day_of_week]
IN ( [1], [2],
... [7])
) AS <alias for the pivot table>
<optional ORDER BY clause>;
Hope that helps
Andreas