I have written SOQL query to get the data between 2 dates 2020-06-01 and 2020-06-30
SELECT Id ,LastModifiedDate
FROM Account
WHERE LastModifiedDate >= 2020-06-01T00:00:00Z
AND LastModifiedDate <= 2020-06-30T23:59:59Z
but I want to implement it using method chain
See this link for information on how to convert a string representation of a SF date to a date literal.
The rest is just a modification for the official docs per your query.