How to show 410 Gone status for subdomains that are already been deleted

I bought an auctioned domain to build my new project, from my analysis with Ahrefs, people that were behind this domain had a subdomain called “forum” for their forum, and somehow they didn’t know how to protect it so there’s thousands of spam threads (pharmacy, drugs and so forth), and probably they deleted the subdomain afterwords, if Googlebot ever fetch those links, it’ll receive 404, but I want to 410 the whole subdomain to deliberately say I deleted this subdomain, I know if I had 404 Googlebot will go back to it a few times until it count it as 410, but I really want to 410 if it’s possible and I have no clue how to do that.