Since local_sensitive_file here is a data source, you can assume that its attributes are the attributes defined by the provider that this data source belongs to, which is hashicorp/local.
At the time of writing the documentation for local_sensitive_file says that it has the following attributes:
filename
content
content_base64
id
Provider documentation is typically the best place to find out about attributes of a resource type because it'll also tell you what these attributes represent, in addition to their names.
Not all objects you'll encounter in Terraform will originate in providers though, so a more general answer that will work for any object you can refer to in an expression is to run terraform console and then ask it for the type of the value in question:
> type(data.local_sensitive_file.public_key)
object({
content: string,
content_base64: string,
filename: string,
id: string,
})
Unfortunately for a resource (either a resource or data block) it won't yet have a known type until it's been created or read for the first time, and so if your configuration isn't valid then you would need to make it valid enough to run terraform apply successfully before you could use this technique. But for objects that are defined within the Terraform configuration itself, rather than by external operations that haven't run yet, the console is a useful way to inspect data and data types.