There are many ways to submit your listening history to ListenBrainz:
VLC Listenbrainz plugin
ListenBrainz can automatically record listens from Spotify.
Importing the same listens from two different sources such as Last.FM and Spotify may cause the creation of duplicates in your listen history. If you opt into our automatic Spotify import, you may notice duplications in the last 50 listens on Spotify.This is a temporary issue while we find better ways to deduplicate listens.
Developers are able to submit their listens to Listenbrainz using the Listenbrainz API. Information on how to do this can be found in the API docs