I’m only a beginner so obv if someone else replies to this then listen to them and not me lol. Most things can be switched around in a sentence but from what I’ve learnt, time seems to come first generally, and the verb must always come last in the sentence/clause. The topic of the sentence is pretty much always omitted if it’s already been established. Cure Dolly on youtube explained sentence structure well in her videos.
In the sentences you wrote, the first one seems correct to me but the second one doesn’t. It reads to me like: “This American melon is a size.” This is just because of how you used 大きさ here though, since it is a noun and not an adjective. The sentence structure otherwise is fine. If we changed 大きさ to something such as 大きい, which is similar and means big, ”このアメリカのメロンは大きいです。” would translate to “This American melon is big.” You could also make it more like the other sentence you wrote. Like : ”このアメリカのメロンはアメリカの大きさです。” : “This American melon is an American size.”
As for “アメリカのメロン” and “メロンはアメリカの” : again the first one could be a topic/subject but the second one couldn’t be. It reads like “The melon is America’s…” Could be wrong but I don’t think the は particle can be used within a subject in this specific way, since it is used to mark topics/subjects. In general, how you order things matters to a degree. Depends on the grammar/particle. の isn’t very flexible and can change the meaning of things a lot depending on where it’s placed/the word order.
Again, I don’t know much Japanese lol so if someone else says something different then they’re probably correct.