I want to get all the weeks of a month with the start and end dates of those weeks without creating a table
generate_series() with timestamp arguments will do what you want.

testdb=# select d::date::text||'-'||(d+interval '6 days')::date::text from
generate_series('2020-06-01', '2020-06-01'::date + interval '3 weeks', interval '1 weeks') d;
       ?column?        
-----------------------
 2020-06-01-2020-06-07
 2020-06-08-2020-06-14
 2020-06-15-2020-06-21
 2020-06-22-2020-06-28
(4 rows)

Time: 0.645 ms