HTML5 has a
<detail> tag (explained here) that shows a summary and shows all text if clicked on read more. Does Google value content inside tag as much as text written outside it?
If the content is viewable only when a user has to click on button to view it, that Googlebot will use that content to determine what a page is about. But content that is visible on a page without requiring a user to take an action to view it is far more likely to be used by Googlebot to determine a page's topic.
Googlebot can render your pages to see how they are visible to their customers. As a result, content that is hidden from a user until they click a button to view it is considered part of the page's content, but not nearly as much as content that is automatically viewable.