Using wildcard does not resolve sub of subdomain

I have a domain xyz.com on (xx.xxx.255.25) and sub.xyz.com on (xx.xxx.255.240)
To resolve sub I added the following reocrd in BIND

sub IN A xx.xxx.255.240
*.sub IN A xx.xxx.255.240


and worked well, but the problem is with the sub of subdomain it did not resolve.
I tried adding a test sub and worked well:

test.sub IN A xx.xxx.255.240

The point of the wildcard (*) is that I have multiple subs (FTP, mail, SMTP...)
So where exactly I did wrong caused the sub of the subdomain to not resolve?

[UPDATE]

Resolving sub of subdomains worked as *@Tommiie* said, but the second problem appeared is with `TXT` records (SPF, DKIM, DMARC), Can I add wildacrd as `A records` to resolve them?

Solution 1:

Do you have other records in the sub subdomain?

The wildcard character matches any number of labels in a name as long as there isn't an exact match with a name already in the name server's database.

Quote from DNS & BIND (5th edition), p. 488

As you also want TXT wildcard records:

*.sub.example.com.  A     xx.xxx.255.240
*.sub.example.com.  TXT   "spv record"
*.sub.example.com.  TXT   "dkim record"
*.sub.example.com.  TXT   "more text records"

Please share a more complete configuration.

PS: remove the trailing dots. It wont work with them in place.