How do I get barrier blocks in bedrock edition?

Solution 1:

Use this command:

/give @s barrier

For some reason the namespaced ID of barriers isn't listed on its own wiki page, so I went to the list of Bedrock Edition data values to find it.