Some of the above comments answer this, but if Loki lied, Thanos would know Loki is not telling the truth. Thanos is clearly very knowledgable about the infinity stones and knows that you can't really just "destroy" them like how it is suggested that the Tesseract was. Thanos is also very aware of how Loki acts and how his personality is, so he would be able to see straight through Loki's bullshit. Even the directors themselves say "Thanos is too smart and aware for Loki's usual parlor tricks."
Besides, Thor is just saying "the Tesseract was destroyed on Asgard" because he is trying live while being palmed by Thanos and keep any remaining people of his alive (as well as maybe assumed it was when Surtur did his thing), but more likely also doesn't know that the stone cannot be destroyed (or at least forgot the fact he tried and failed to destroy the Aether in Thor: The Dark World, as Odin and Bor even say it cannot be destroyed (to their knowledge)).
Yes, each of the stones or at least the mind stone, as suggested by Vision and demonstrated between Vision and Wanda in Avengers: Infinity War, can be destroyed if exposed to the same energy that constructs them at sufficiently high levels. It isn't clear if Thanos knows this fact about the infinity stones or not, but regardless he knows they're some of the toughest things in existence and wouldn't be destroyed like how Thor is suggesting it was. And, in addition to this, it is clearly suggested that Thanos and his generals, The Black Order, have the ability to track the infinity stones. After Thanos retrieved the power stone, Odin and Asgard's existence be damned, Thanos was definitely heading to Asgard next to get the Tesseract and would have succeeded (if nothing else because of plot reasons). Clearly he knew the space stone was on Asgard and so he was going there after he captured the power stone on Xandar.
It just so happens that, probably to Thanos' surprise, Asgard is on a little (supply ship?) vessel floating about in deep space and that the Tesseract is on this vessel (which Thanos knows due to his tracking abilities/devices for the infinity stones he and his Black Order have). Thanos probably smiled as his job got even easier, and though he might not have known immediately that Loki and the remaining Asgardians were on this ship, but at the absolute bare minimum Thanos knew the Tesseract was on this ship. This is all why even if Loki lied to Thanos, it wouldn't have worked and ultimately Thanos was going to get that stone.
Besides, even if Thor was somehow correct in that the Tesseract was destroyed on Asgard when Surtur blew the realm to pieces, the Tesseract isn't technically the space stone, just the housing unit for it. The Tesseract allows the user to use the space stone to teleport and presumably some of its other capabilities, but the stone itself is housed in the center of it so even if the Tesseract (aka, the casing of the space stone) was destroyed on Asgard, the stone itself would still be floating somewhere out there in deep space amongst the rocks and ruin that was once Asgard as all that would have been destroyed would be the casing that Thanos crushes with his bare hand.
I want to elaborate on this opening scene as a whole though, as it is related to your initial question and may clear up any other questions other people may have.
At the end of Thor: Ragnorak, when Loki is taking Surtur's crown to the eternal flame and sees the Tesseract, Loki grabs the Tesseract mainly because he knows he owes Thanos that stone, and god forbid he run into him again he better have it and maybe he'll get to survive that encounter (you can also argue that Loki also probably knew the stone would hopefully be safe under the protection of his brother and that it wouldn't be wise to just leave an infinity stone floating about in space, but I personally think this was like, weighted, 1% of the reasoning why he took the stone. It's definitely 99% the reason of ever running into Thanos). It is clear from Thanos saying "Fine, I'll do it myself" that he is done with using lackeys to get the infinity stones for him when his generals and he can just do it better and more efficiently themselves. Thanos was more than likely furious at Loki for screwing him out of both the space stone and the mind stone, which mind you was previously in Thanos' possession as well as costing him his Chitauri army (or at least a large portion of it considering the central station from which they were being deployed got destroyed by the explosion of the nuclear bomb Tony redirected into it). Thanos already had an infinity stone, gave it to Loki (which Loki seemed to be unaware that the scepter actually contained the infinity stone), and then he lost it. So when Loki grabs the Tesseract, he's hoping that god forbid he ever see Thanos again, if he at least gives him the Tesseract maybe he'll live. It's Loki, he really only ever looks out for himself. Yes, he has a nice arc in Thor: Ragnorak by showing up in the Statesman at the end of the movie and climactic battle between Thor and Hela to help save Asgard, but Loki grabs that stone just to cover his ass. So now when we jump to the mid-credits scene and Loki sees Thanos' monumentally massive ship appear in front of them, Loki, recognizing the ship and who is in it, knows immediately that he and his people are freaking screwed.
So when Thanos then arrives on the Statesman after blowing a lot of it to smithereens and then proceeds to incapacitate Thor while his generals murder the rest of the remaining Asgardians who weren't able to flee with Valkyrie, and is monologuing to Loki flashing the fact he has the Power Stone, knowing that Loki has the Space Stone, Loki reluctantly hands it over, but the audience quickly sees where his allegiances lie (as does Thanos) by saying "We have a Hulk." Loki hopes the Hulk can beat/kill Thanos considering Loki personally knows Hulk to be incredibly strong and has seen how he fights (and bested his brother, though we all know who was going to win that fight in the first place), but when that fails, Thanos knows he's just going to leave Loki for dead when he destroys the ship (implied by Thanos' indifference to Loki).
Now that Loki's best hope for his survival (and maybe his people's, though I think he's mainly just still trying to save his own skin here) has just been easily beaten and beaten badly, all Loki has are his standard parlor tricks that Thanos is keenly aware of and can see straight through. So when Loki offers his assistance to be a guide for his generals going to Earth, Thanos knows he's just trying to save himself and escape punishment/the fate that awaits him. Also, because Loki screwed Thanos over by failing to bring back the space stone and mind stone, Thanos doesn't let Loki serve as a guide and was never going to entertain the idea of this in the first place precisely because of his extreme failure that cost Thanos a huge amount of resources and seriously delayed Thanos and his quest to gather the stones (I'm sure this is one of Thanos' biggest regrets--letting Loki serve as his lackey to gather the stones). This is all demonstrated by Thanos humorously scoffing at the idea by saying "If you consider failure experience." Then, in Loki's purely last-ditch attempt to live, he offers his allegiance to Thanos (who knows damn well it isn't sincere but is entertained at Loki's desperation and is fully expecting Loki to try some maneuver to either kill or maim him or just do something to get out of the predicament Loki finds himself in) with "undying fidelity" but then tries to stab Thanos in the neck which doesn't work because Thanos fully expects this out of Loki and uses his newly gathered space stone to freeze Loki before he can stab him. Thanos, both humored and angered by Loki's actions, mockingly says "undying" back to a completely helpless and now terrified Loki and proceeds to strangle Loki almost to death, who kicks and struggles like a drowning dog gasping for air and whose last words are "You'll never be a god." Thanos, still angry yet humored at the fact he's got his payback to Loki, snaps his neck and throws his corpse at the feet of a helpless Thor and then teleports away destroying the rest of the ship with the power stone.
Now I want to make a much briefer comment about the infinity stones but this contains MASSIVE spoilers for Avengers: Endgame, particularly the opening scene. I realize the spoiler banner has officially been released by the Russo Brothers as of this past Monday, May 6th, 2019, but just in case anybody reading this hasn't seen the movie yet, don't read this.
After watching Avengers: Endgame I'd wager that Thanos already knew before Infinity War that the stones could be destroyed only by their own exact energy and even if he didn't know this about the stones, I think it is safe to assume that he figured once he had all six stones he could destroy them using their combined power if he wanted to. Thus, with this in mind, Thanos knows the Tesseract is on the Statesman and not destroyed on Asgard not only because they more than likely have the technology to track the locations of each of the infinity stones, but also because Thanos knows the only way to destroy an infinity stone is with the same energy of the infinity stone you're trying to destroy or using the power of all six stones combined to destroy the stones, just as he does offscreen in Endgame before being confronted in a surprise assault 23 days after the Decimation by War Machine, Rocket, Nebula, Natasha, Captain America, Captain Marvel, Bruce Banner in the Hulkbuster Armor, and Thor with the purpose of gathering the stones to undo the snap. Thanos, not seeing this coming whatsoever, is cooking some food in his little hut on that planet he retires to called "The Garden" when all of a sudden is being held down while Thor using Stormbreaker proceeds to slice off Thanos' left forearm/gauntlet arm when they try to gather the stones and undo the snap only to find out Thanos destroyed them to avoid "temptation" and it "damn well nearly killed" him. Thanos goes on to say "The universe needed correction. I am inevitable" which Thor responds to by slicing his head clean off with Stormbreaker, replying to someone asking "what did you just do?!" with "... I went for the head..."