Both sentences are correct. German has a much more flexible word ordern than English, because in English you identify the grammatical function of a part of speech by its place in the sentence. In German you identify the grammatical function by the grammatical case.
The man eats the broccoli.
In German you can say this in two ways:
Der Mann isst den Brokkoli.
Den Brokkoli isst der Mann.
In both sentences der Mann is in nominative case and therefore must be the subject, i.e. the one who is performing the action (which is eating).
Also, if you have two or more objects, they can float through the sentence almost as they like. There is one very hard rule: The inflected part of the verb always must stand on position two of a statement. (Note, that questions and commands aren't statements and have different rules.) There are also some other rules, but they are complicated and, more important, not so strict as the inflected-verb-on-position-two-rule.
So, lets analyze your sentence
personal pronoun in nominative case.
Since there is on other part of speech in this sentence which is in nominative case, wir must be the subject. (Note, that another part of this sentence is a sentence on its own, which also has a subject, but this other subject is not a part of this main clause.)
a full verb that is inflected to 1st person plural, in Präsens (roughly equivalent to present tense). Since the verb also must match with the subject in number and person, you can tell from just this verb, that the subject must be in 1st person plural. Since only wir matches this conditions, only wir can be the subject.
dass Füllwörter in Sätzen eine sehr wichtige Funktion haben
A so called »dass«-Satz als Akkusativ-Ergänzung
The whole group of 9 words is one part of speech. It is an Ergänzung (complement) of the verb wissen, with needs its complement to be in accusative case, so it is an Akkusativ-Ergänzung. But it also is a whole sentence for its own. But because this sentence it bound to a higher sentence (»wir wissen ◻︎◻︎◻︎«) with the subordinate conjunction dass, it is a untergeordneter Nebensatz which has a differente word order than a normal statement.
In a Nebensatz the inflected verb must stand at the last position. Everything else is more or less flexible.
As said before: There is no rule in german grammar, that forces the subject to be at position 1. It can be everywhere (except on position 2 which is reserved for the verb). So also this is absolutely correct and high quality German:
Dass Füllwörter in Sätzen eine sehr wichtige Funktion haben, wissen wir.
Now let's habe a closer look into this subordinate clause:
A noun in nominative case
Nominative case is always a very strong hint for being the subject. If there is no other part of speech in nominative case, we know for sure that it certainly is the subject.
an optional complement to the verb which describes a location. Note, that this part of speech itself is not in any grammatical case. But it consists of a preposition (in) and an dative object (Sätzen).
eine sehr wichtige Funktion
this is an accusative object. It is a mandatory complement of the verb haben.
This object consists of four parts:
- eine indefinite article, belongs to the noun Funktion
- sehr grade particle that modifies the attribute wichtige
- wichtige an adjective that is an attribute of the noun Funktion
- Funktion the core of this Object; a noun in accusative case
From those parts of speech only two have a fixed position:
- dass must be at position 1, because it defines this sentence as subordinate clause.
- haben the inflected part of the verb, that must stand at the last position. (Here the verb has no other parts.)
But everything else can float almost freely. So this are all correct subordiante clauses:
- dass Füllwörter eine sehr wichtige Funktion in Sätzen haben
- dass Füllwörter in Sätzen eine sehr wichtige Funktion haben
- dass in Sätzen Füllwörter eine sehr wichtige Funktion haben
But note, that the subject can not stand stand somewhere after the accusative object in a subordinate clause. This is one of the complicated rules I've been talking before. This is why the order
◻︎◻︎◻︎ eine sehr wichtige Funktion ◻︎◻︎◻︎ Füllwörter ◻︎◻︎◻︎
is not correct in a subordinate clause.
But this order is correct in a main clause, but only when the accusative object is on position 1.
Eine sehr wichtige Funktion haben Füllwörter in Sätzen. - correct
Eine sehr wichtige Funktion haben in Sätzen Füllwörter. - correct (but unusual)
When Subject and accusative object both stand behind the verb (i.e. non of them on position 1), the subject must stand before the object, like in the subordinate clause:
In Sätzen haben Füllwörter eine sehr wichtige Funktion. - correct
In Sätzen haben eine sehr wichtige Funktion Füllwörter. - wrong
But this complicated rules for word orders are not as strict as the verb-on-position-2-rule. If you want to emphasize Füllwörter really very strong, you also can even use the sentence, that I have marked as wrong. But if you du so, you should really know very well what you are doing, because if you do so, you are walking on very thin ice. Better avoid such sentences. But when you hear it, know that is can be used as a rare stylistic tool to emphasize something really strong.